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

DDL statement parisng with SQL comment

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Out of Date
    • 1.4.2.Final, 1.5.0.Final
    • None
    • None

    Description

      I got the following error on parsing the DDL command when there is a client comment in the log:

      "trace": "org.apache.kafka.connect.errors.ConnectException: DDL statement couldn't be parsed. Please open a Jira issue with the statement '\/* ApplicationName=DBeaver 21.2.0 - Main *\/ REVOKE FLUSH_TABLES ON *.* FROM 'debezium'@'%''no viable alternative at input 'REVOKE FLUSH_TABLES'    at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:241)    at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:218)    at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:607)    at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1104)    at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:955)    at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:595)    at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:839)    at java.base\/java.lang.Thread.run(Thread.java:834)Caused by: io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement '\/* ApplicationName=DBeaver 21.2.0 - Main *\/ REVOKE FLUSH_TABLES ON *.* FROM 'debezium'@'%''no viable alternative at input 'REVOKE FLUSH_TABLES'    at io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:43)    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.reportNoViableAlternative(DefaultErrorStrategy.java:310)    at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:136)    at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1157)    at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:885)    at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:72)    at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:45)    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:810)    at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:590)    ... 5 moreCaused by: org.antlr.v4.runtime.NoViableAltException    at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2026)    at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:467)    at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:393)    at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:959)    ... 12 more"

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mr_anderss0n Ali Daneshmand (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: