-
Bug
-
Resolution: Done
-
Major
-
1.9.7.Final
-
None
-
False
-
None
-
False
What Debezium connector do you use and what version?
1.9.7.Final MySQL connector
What is the captured database version and mode of depoyment?
MySQL 8.0.18
What behaviour do you see?
Caused by: java.lang.NumberFormatException at java.math.BigDecimal.<init>(BigDecimal.java:497) at java.math.BigDecimal.<init>(BigDecimal.java:383) at java.math.BigDecimal.<init>(BigDecimal.java:809) at io.debezium.connector.mysql.MySqlValueConverters.lambda$convertUnsignedBigint$28(MySqlValueConverters.java:782) at io.debezium.jdbc.JdbcValueConverters.convertValue(JdbcValueConverters.java:1297) at io.debezium.connector.mysql.MySqlValueConverters.convertUnsignedBigint(MySqlValueConverters.java:774) at io.debezium.connector.mysql.MySqlValueConverters.lambda$converter$12(MySqlValueConverters.java:280) at io.debezium.connector.mysql.MySqlDefaultValueConverter.parseDefaultValue(MySqlDefaultValueConverter.java:113) at io.debezium.relational.TableSchemaBuilder.lambda$addField$9(TableSchemaBuilder.java:393) at java.util.Optional.flatMap(Optional.java:241) at io.debezium.relational.TableSchemaBuilder.addField(TableSchemaBuilder.java:393) at io.debezium.relational.TableSchemaBuilder.lambda$create$2(TableSchemaBuilder.java:149) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at io.debezium.relational.TableSchemaBuilder.create(TableSchemaBuilder.java:147) at io.debezium.relational.RelationalDatabaseSchema.buildAndRegisterSchema(RelationalDatabaseSchema.java:135) at io.debezium.connector.mysql.MySqlDatabaseSchema.lambda$applySchemaChange$2(MySqlDatabaseSchema.java:179) at java.lang.Iterable.forEach(Iterable.java:75) at io.debezium.connector.mysql.MySqlDatabaseSchema.applySchemaChange(MySqlDatabaseSchema.java:179) at com.ververica.cdc.connectors.mysql.debezium.dispatcher.EventDispatcherImpl$SchemaChangeEventReceiver.schemaChangeEvent(EventDispatcherImpl.java:212) at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$handleQueryEvent$2(MySqlStreamingChangeEventSource.java:672) ... 12 more
Do you see the same behaviour using the latest relesead Debezium version?
NO. But I see the code is not right in the master branch.
How to reproduce the issue using our tutorial deployment?
Parsing the DDL as follows:
" CREATE TABLE default_value_test_ignore (\n" + " id INTEGER NOT NULL PRIMARY KEY, \n" + " tiny_c TINYINT DEFAULT ' 0 ', \n" + " boolean_c BOOLEAN DEFAULT ' 1 ', \n" + " tiny_un_z_c TINYINT UNSIGNED ZEROFILL DEFAULT ' 2 ', \n" + " small_c SMALLINT DEFAULT ' 3 ', \n" + " small_un_c SMALLINT UNSIGNED DEFAULT ' 4 ',\n" + " small_un_z_c SMALLINT UNSIGNED ZEROFILL DEFAULT ' 5 ', \n" + " medium_c MEDIUMINT DEFAULT ' 6 ', \n" + " medium_un_c MEDIUMINT UNSIGNED DEFAULT ' 7 ', \n" + " medium_un_z_c MEDIUMINT UNSIGNED ZEROFILL DEFAULT ' 8 ', \n" + " int_c INTEGER DEFAULT ' 9 ', \n" + " int_un_c INTEGER UNSIGNED DEFAULT ' 10 ', \n" + " int_un_z_c INTEGER UNSIGNED ZEROFILL DEFAULT ' 11 ',\n" + " int11_c INT(11) DEFAULT ' 12 ', \n" + " big_c BIGINT DEFAULT ' 13 ', \n" + " big_un_c BIGINT UNSIGNED DEFAULT ' 14 ', \n" + " big_un_z_c BIGINT UNSIGNED ZEROFILL DEFAULT ' 15 ', \n" + " decimal_c DECIMAL(8, 4) DEFAULT ' 16 ', \n" + " decimal_un_c DECIMAL(8, 4) UNSIGNED DEFAULT ' 17 ', \n" + " decimal_un_z_c DECIMAL(8, 4) UNSIGNED ZEROFILL DEFAULT ' 18 ', \n" + " numeric_c NUMERIC(6, 0) DEFAULT ' 19 ', \n" + " big_decimal_c DECIMAL(65, 1) DEFAULT ' 20 ',\n" + " real_c REAL DEFAULT ' 21.0',\n" + " float_c FLOAT DEFAULT ' 22.0',\n" + " float_un_c FLOAT UNSIGNED DEFAULT ' 23',\n" + " float_un_z_c FLOAT UNSIGNED ZEROFILL DEFAULT ' 24',\n" + " double_c DOUBLE DEFAULT ' 25',\n" + " double_un_c DOUBLE UNSIGNED DEFAULT ' 26',\n" + " double_un_z_c DOUBLE UNSIGNED ZEROFILL DEFAULT ' 27',\n" + " tiny_un_c TINYINT UNSIGNED DEFAULT ' 28 '" + " );"
Implementation ideas (optional)
Add BIGINT and SMALLINT types to field TRIM_DATA_TYPES in class MySqlDefaultValueConverter.
- links to
-
RHEA-2023:120698 Red Hat build of Debezium 2.3.4 release