Hello,
I have a problem using MySqlConnector.
Case-sensitive was required for a particular column.
So I changed the column by usin below sql. (set binary option to change collation )
ALTER TABLE `test` CHANGE `case_insensitive` `case_sensitive` VARCHAR(10) CHARACTER SET utf8mb4 BINARY NULL DEFAULT NULL;
And then, spitting out this log, the connector stopped.
trace: "org.apache.kafka.connect.errors.ConnectException: mismatched input 'BINARY' expecting {<EOF>, '--'} at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:230) at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:207) at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:604) at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1100) at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:951) at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:594) at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:838) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: io.debezium.text.ParsingException: mismatched input 'BINARY' expecting {<EOF>, '--'} at io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:40) at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41) at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544) at org.antlr.v4.runtime.DefaultErrorStrategy.reportInputMismatch(DefaultErrorStrategy.java:327) at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:139) at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:902) at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:68) at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:41) at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:80) at io.debezium.connector.mysql.MySqlSchema.applyDdl(MySqlSchema.java:326) at io.debezium.connector.mysql.BinlogReader.handleQueryEvent(BinlogReader.java:807) at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:587) ... 5 more Caused by: org.antlr.v4.runtime.InputMismatchException at org.antlr.v4.runtime.DefaultErrorStrategy.sync(DefaultErrorStrategy.java:270) at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:887) ... 11 more "
It is asumed that the ddl parser of debezium failed to process the column's collation change.
My connector just died.
The settings of the column have been restored to their original state, but the connector is stopped.
What should I do in this case?
And how can I use a case-sensitive column with a debezium?
For your information, I attach my debezium MySqlConnector settings.
{
"name": "test-connector",
"config": {
"connector.class": "io.debezium.connector.mysql.MySqlConnector",
"tasks.max": "1",
"database.hostname": "...",
"database.port": "13306",
"database.user": "...",
"database.password": "...",
"database.server.id": "5555",
"database.server.name": "mysql_dev",
"database.include.list": "my_db",
"table.include.list": "my_db.my_table",
"tombstones.on.delete": false,
"database.history.kafka.bootstrap.servers": "...",
"database.history.kafka.topic": "schema.changes.my_db",
"skipped.operations": "d",
"value.converter": "io.debezium.converters.CloudEventsConverter",
"message.key.columns": "my_db.my_table:aggregate_id"
}
}