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

Fatal error when parsing Mysql (Percona 5.7.39-42) procedure

XMLWordPrintable

    • Important

      Dbz crashes on this procedure:

       

      DROP PROCEDURE IF EXISTS `test_parse_array`;
      CREATE DEFINER=`gpuser`@`%` PROCEDURE `test_parse_array` (IN val INT)
      BEGIN
      DECLARE array VARCHAR(50);
      
      SELECT 1;
      
      END

      On "DECLARE array VARCHAR(50);"

       

      Exception:

      [2023-06-27 07:42:02,728] ERROR [bukmaker-connector-sandbox-44|task-0] Error during binlog processing. Last offset stored = {transaction_id=null, ts_sec=1687851722, file=mysql-bin.000927, pos=128291, gtids=2a9728ee-de91-11ed-96f3-6a32bf6e31c4:1-720483, server_id=1, event=1}, binlog reader near position = mysql-bin.000927/128291 (io.debezium.connector.mysql.MySqlStreamingChangeEventSource:1153)[2023-06-27 07:42:02,729] ERROR [bukmaker-connector-sandbox-44|task-0] Producer failure (io.debezium.pipeline.ErrorHandler:57)io.debezium.DebeziumException: Error processing binlog event	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:393)	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$27(MySqlStreamingChangeEventSource.java:928)	at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1246)	at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:1072)	at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:631)	at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:932)	at java.base/java.lang.Thread.run(Thread.java:829)Caused by: io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'CREATE DEFINER=`gpuser`@`%` PROCEDURE `test_parse_array`(IN val INT)BEGINDECLARE array VARCHAR(50);
      SELECT 1;END'no viable alternative at input 'CREATE DEFINER=`gpuser`@`%` PROCEDURE `test_parse_array`(IN val INT)\nBEGIN\nDECLARE array'	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:543)	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:1268)	at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:984)	at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:74)	at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:46)	at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:78)	at io.debezium.connector.mysql.MySqlDatabaseSchema.parseDdl(MySqlDatabaseSchema.java:213)	at io.debezium.connector.mysql.MySqlDatabaseSchema.parseStreamingDdl(MySqlDatabaseSchema.java:199)	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleQueryEvent(MySqlStreamingChangeEventSource.java:591)	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$15(MySqlStreamingChangeEventSource.java:899)	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:373)	... 6 moreCaused by: org.antlr.v4.runtime.NoViableAltException	at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2028)	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:1060)	... 15 more[2023-06-27 07:42:02,731] INFO [bukmaker-connector-sandbox-44|task-0] Error processing binlog event, and propagating to Kafka Connect so it stops this connector. Future binlog events read before connector is shutdown will be ignored. (io.debezium.connector.mysql.MySqlStreamingChangeEventSource:398)[2023-06-27 07:42:02,962] ERROR [bukmaker-connector-sandbox-44|task-0] WorkerSourceTask{id=bukmaker-connector-sandbox-44-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask:210)org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.	at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:72)	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:393)	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$27(MySqlStreamingChangeEventSource.java:928)	at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1246)	at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:1072)	at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:631)	at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:932)	at java.base/java.lang.Thread.run(Thread.java:829)Caused by: io.debezium.DebeziumException: Error processing binlog event	... 7 moreCaused by: io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'CREATE DEFINER=`gpuser`@`%` PROCEDURE `test_parse_array`(IN val INT)BEGINDECLARE array VARCHAR(50);
      SELECT 1;END'no viable alternative at input 'CREATE DEFINER=`gpuser`@`%` PROCEDURE `test_parse_array`(IN val INT)\nBEGIN\nDECLARE array'	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:543)	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:1268)	at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:984)	at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:74)	at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:46)	at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:78)	at io.debezium.connector.mysql.MySqlDatabaseSchema.parseDdl(MySqlDatabaseSchema.java:213)	at io.debezium.connector.mysql.MySqlDatabaseSchema.parseStreamingDdl(MySqlDatabaseSchema.java:199)	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleQueryEvent(MySqlStreamingChangeEventSource.java:591)	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$15(MySqlStreamingChangeEventSource.java:899)	at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:373)	... 6 moreCaused by: org.antlr.v4.runtime.NoViableAltException	at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2028)	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:1060)	... 15 more
       

      What Debezium connector do you use and what version?

      2.3.0 Final - parsing error;

      2.3.0 Final + debezium-ddl-parser-2.4.jar (builded from sources)- parsing error;

      What is the captured database version and mode of depoyment?

      Mysql (Percona 5.7.39-42) 

       

              rh-ee-mvitale Mario Fiore Vitale
              politov.eugene Eugenius Politou (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: