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

MySQL DATE default value parser rejects timestamp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.6.0.Alpha1
    • None
    • mysql-connector
    • None

      See https://gitter.im/debezium/dev?at=60916d174d0065337e51e893

      When DDL like

      ALTER TABLE `db`.`table`
      CHANGE COLUMN `end_date` `end_date` DATE NULL DEFAULT '2050-01-01 00:00:00'
      

      is used the default value parser will throw an exception. The problem is that DATE should contain only date but MySQL accepts also timestamp.

      It si necessary to update io.debezium.connector.mysql.MySqlDefaultValueConverter.convertToLocalDate(Column, String) and intorduce a new DateTimeFromatter instead of ISO_LOCAL_DATE.

      This new formatter wil contain ISO_LOCAL_DATE and optionally ISO_LOCAL_TIME.

      It is also necessary to verify whether zero should be compared not only against epoch data but against epoch timestamp too.

              anmohant Anisha Mohanty
              jpechane Jiri Pechanec
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: