Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-2666

MySQL decimal defaults incorrectly translated in schema

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Minor
    • None
    • 1.3.0.CR1
    • mysql-connector
    • None
    • False
    • False
    • Undefined

    Description

      Example MySQL definition:

      `percentage` decimal(5,2) DEFAULT '0.00'
      

       

      Resulting schema:

      {                                                                                                                                                         
          "default": "\u0000",                                                                                                                                  
          "name": "percentage",                                                                                                                          
          "type": [                                                                                                                                             
              {                                                                                                                                                 
                  "scale": 2,                                                                                                                                   
                  "precision": 5,                                                                                                                               
                  "connect.version": 1,                                                                                                                         
                  "connect.parameters": {                              
                      "scale": "2",                                    
                      "connect.decimal.precision": "5"                 
                  },                                                   
                  "connect.default": "AA==",
                  "connect.name": "org.apache.kafka.connect.data.Decimal",                                                                                      
                  "logicalType": "decimal",                            
                  "type": "bytes"                                      
              },                                                       
              "null"                                                   
          ]                                                            
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            dxhuang Daniel Huang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: