-
Bug
-
Resolution: Done
-
Major
-
1.5.4.Final
-
None
In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
Bug report
Execute the ddl in the source DB:
CREATE TABLE `dd2` ( `id` INT ( 11 ) NOT NULL, `name` VARCHAR ( 255 ), UNIQUE KEY `test` ( `name` ) , PRIMARY KEY ( `id` ) ) ENGINE = INNODB;
In the event captured by debezium, the column `name` is marked as not null (optional = false), which is opposite to the original ddl:
"ddl": "CREATE TABLE `dd2` (\r\n\t`id` INT ( 11 ) NOT NULL,\r\n\t`name` VARCHAR ( 255 ),\r\n\tUNIQUE KEY `test` ( `name` ) ,\r\n\tPRIMARY KEY ( `id` )\r\n) ENGINE = INNODB",
"tableChanges": [
{
"type": "CREATE",
"id": "\"mdm_source\".\"dd2\"",
"table": {
"defaultCharsetName": null,
"primaryKeyColumnNames": [
"id"
],
"columns": [
,
]
}
}
]
What Debezium connector do you use and what version?
mysql connector, 1.5.4
What is the connector configuration?
"key.converter.schemas.enable": "true"
"value.converter.schemas.enable": "true"
"include.schema.changes": "true"
What is the captured database version and mode of depoyment?
mysql 8.0.17
What behaviour do you expect?
column marked as nullable
What behaviour do you see?
column marked as not null