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

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

    XMLWordPrintable

    Details

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: