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

Exception while parsing table schema with invalid default value for timestamp field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 0.9.0.Alpha2
    • 0.8.1.Final
    • mysql-connector
    • None

      MySQL allows zero date time values like '0000-00-00 00:00:00' or '2000-00-00 00:00:00'.

      To reproduce the issue I created 2 mysql -

      create table test_table1 (
      `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
      `pick_up_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      PRIMARY KEY (`id`)
      )

      create table test_table2 (
      `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
      `pick_up_time` datetime NOT NULL DEFAULT '2000-00-00 00:00:00',
      PRIMARY KEY (`id`)
      )

      Now, when I submit the connector in schema_snapshot mode, the first table gets parsed properly but the second table throws an error. I have attached the stacktrace.

      Also, I saw the code where it is happening and I am familiar with the cause of it. I would be happy to contribute a fix for this.

      Thanks

              deepakbarr Deepak Barr (Inactive)
              deepakbarr Deepak Barr (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: