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

Unsigned smallint column in mysql failing due to out of range error

    XMLWordPrintable

    Details

      Description

      Debezium Mysql Connector is not able to parse table schema with column as "smallint unsigned" in mysql schema with default value as "65535" and throwing below error. This seems to be happening because java's short is signed and supports only till 32767. However mysql smallint supports both signed and unsigned. So there seems to be some issue in handling of unsigned smallint (or any unsigned typed in general) while parsing defaultValue.

      Caused by: java.lang.NumberFormatException: Value out of range. Value:"65535" Radix:10
              at java.lang.Short.parseShort(Short.java:120)
              at java.lang.Short.parseShort(Short.java:144)
              at io.debezium.connector.mysql.MySqlDefaultValuePreConverter.convertToSmallInt(MySqlDefaultValuePreConverter.java:245)
              at io.debezium.connector.mysql.MySqlDefaultValuePreConverter.convert(MySqlDefaultValuePreConverter.java:72)
              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)
      

      This was reported on mailing list over here https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/debezium/0XQbYVQJeLY/MTMked49BgAJ

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                agrawalgagan Gagan Agrawal
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: