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

Fail to parse MySQL TIME with values bigger than 23:59:59.999999

    Details

      Description

      According to the MySQL spec for 5.6:

      "A time. The range is '-838:59:59.000000' to '838:59:59.000000'. MySQL displays TIME values in 'HH:MM:SS[.fraction]' format, but permits assignment of values to TIME columns using either strings or numbers."

      However, this is the error I'm getting:

      SomeDate date NOT NULL DEFAULT '2019-02-12',
      SomeDateTime datetime(3) NOT NULL DEFAULT '2019-02-12 23:59:59.999',
      SomeTimestamp timestamp(3) NOT NULL DEFAULT '2019-02-12 23:59:59.999',
      *SomeTime time(3) NOT NULL DEFAULT '150:59:59.999',*
      SomeYear year(4) NOT NULL DEFAULT '2019',
      PRIMARY KEY (ComplexTableUuid)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 at line 33, column 54
      at io.debezium.relational.ddl.LegacyDdlParser.parsingFailed(LegacyDdlParser.java:555)
      at io.debezium.relational.ddl.LegacyDdlParser.parse(LegacyDdlParser.java:227)
      at io.debezium.relational.ddl.LegacyDdlParser.parse(LegacyDdlParser.java:200)
      at io.debezium.connector.mysql.MySqlSchema.applyDdl(MySqlSchema.java:298)
      at io.debezium.connector.mysql.SnapshotReader.lambda$execute$12(SnapshotReader.java:441)
      at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:412)
      at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:353)
      at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:439)
      ... 3 more
      *Caused by: java.time.format.DateTimeParseException: Text '150:59:59.999' could not be parsed at index 2*
      at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949)
      at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1777)
      at io.debezium.connector.mysql.MySqlDefaultValuePreConverter.convertToDuration(MySqlDefaultValuePreConverter.java:161)
      at io.debezium.connector.mysql.MySqlDefaultValuePreConverter.convert(MySqlDefaultValuePreConverter.java:64)
      at io.debezium.connector.mysql.MySqlDdlParser.convertDefaultValueToSchemaType(MySqlDdlParser.java:810)
      at io.debezium.connector.mysql.MySqlDdlParser.parseCreateColumn(MySqlDdlParser.java:771)
      at io.debezium.connector.mysql.MySqlDdlParser.parseCreateDefinition(MySqlDdlParser.java:747)
      at io.debezium.connector.mysql.MySqlDdlParser.parseCreateDefinitionList(MySqlDdlParser.java:591)
      at io.debezium.connector.mysql.MySqlDdlParser.parseCreateTable(MySqlDdlParser.java:403)
      at io.debezium.connector.mysql.MySqlDdlParser.parseCreate(MySqlDdlParser.java:306)
      at io.debezium.connector.mysql.MySqlDdlParser.parseNextStatement(MySqlDdlParser.java:175)
      at io.debezium.relational.ddl.LegacyDdlParser.parse(LegacyDdlParser.java:219)
      ... 9 more
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jpechanec Jiri Pechanec
                Reporter:
                javierholguera Javier Holguera
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: