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

No viable alternative at input error on "min" column

XMLWordPrintable

    • False
    • False
    • Undefined
    • Hide

      export DEBEZIUM_VERSION=1.3
      docker-compose -f docker-compose-mysql.yaml up

      curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" http://localhost:8083/connectors/ -d @register-mysql.json

      docker-compose -f docker-compose-mysql.yaml exec mysql bash -c 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD inventory'

      CREATE TABLE IF NOT EXISTS min_max_test  (
        id char(36) NOT NULL,
        min varchar(100) DEFAULT NULL,
        max varchar(100) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
      
      Show
      export DEBEZIUM_VERSION=1.3 docker-compose -f docker-compose-mysql.yaml up curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" http://localhost:8083/connectors/ -d @register-mysql.json docker-compose -f docker-compose-mysql.yaml exec mysql bash -c 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD inventory' CREATE TABLE IF NOT EXISTS min_max_test ( id char (36) NOT NULL , min varchar (100) DEFAULT NULL , max varchar (100) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

      connect_1    | 2020-11-10 13:44:04,681 ERROR  MySQL|dbserver1|binlog  Failed due to error: Error processing binlog event   [io.debezium.connector.mysql.BinlogReader]
      connect_1    | org.apache.kafka.connect.errors.ConnectException: no viable alternative at input 'CREATE TABLE IF NOT EXISTS min_max_test  (\n  id char(36) NOT NULL,\n  min'
      connect_1    | 	at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:230)
      connect_1    | 	at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:207)
      connect_1    | 	at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:604)
      connect_1    | 	at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1100)
      connect_1    | 	at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:951)
      connect_1    | 	at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:594)
      connect_1    | 	at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:838)
      connect_1    | 	at java.base/java.lang.Thread.run(Thread.java:834)
      connect_1    | Caused by: io.debezium.text.ParsingException: no viable alternative at input 'CREATE TABLE IF NOT EXISTS min_max_test  (\n  id char(36) NOT NULL,\n  min'
      connect_1    | 	at io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:40)
      connect_1    | 	at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
      connect_1    | 	at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544)
      connect_1    | 	at org.antlr.v4.runtime.DefaultErrorStrategy.reportNoViableAlternative(DefaultErrorStrategy.java:310)
      connect_1    | 	at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:136)
      connect_1    | 	at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1154)
      connect_1    | 	at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:882)
      connect_1    | 	at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:68)
      connect_1    | 	at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:41)
      connect_1    | 	at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:80)
      connect_1    | 	at io.debezium.connector.mysql.MySqlSchema.applyDdl(MySqlSchema.java:326)
      connect_1    | 	at io.debezium.connector.mysql.BinlogReader.handleQueryEvent(BinlogReader.java:807)
      connect_1    | 	at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:587)
      connect_1    | 	... 5 more
      connect_1    | Caused by: org.antlr.v4.runtime.NoViableAltException
      connect_1    | 	at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2026)
      connect_1    | 	at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:467)
      connect_1    | 	at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:393)
      connect_1    | 	at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:956)
      connect_1    | 	... 12 more
      

              Unassigned Unassigned
              mikekamornikov Mikhail Kamornikau (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: