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

Change MySQL connector to put all columns in the record's value

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Blocker Blocker
    • 0.1
    • 0.1
    • mysql-connector
    • None

      Currently, when the MySQL connector handles a change event on a row, it creates a record with a key that contains the row's primary/unique key columns, and a value that contains the remaining columns. This behavior does not work when a table's primary/unique key consists of all columns, since the connector would then use null for the value, even if the change event is an insert or update.

      Instead, the connector should include all columns in the record value (and still use the pk/uk columns in the record key). This results in proper behavior for all tables with a pk/uk, even if the table's pk/uk consists of all columns in the table.

      Since, this approach does lead to some duplicated data, it would be possible in the future to add an "optimization" for tables with at least one column not in the primary/unique key, whereby the primary/unique key columns are excluded from the value. Since it's not known whether this is really desirable, we'll not offer this optimization option now.

            rhauch Randall Hauch (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: