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

MySql Connector - no viable alternative at input

XMLWordPrintable

    • False
    • False
    • Undefined

      First issue creation here, apologies for any mistakes/misalignment to standards .

       

      Debezium (kafka connect) running on version 2.4.0.

      Connected to MySql Server (innoDB) on version 5.7.31

      Connector was running smoothly till a stored procedure was created:

       

      {    "name": "myconnector",    "connector": {        "state": "RUNNING",        "worker_id": "192.168.20.132:8083"    },    "tasks": [        {            "id": 0,            "state": "FAILED",            "worker_id": "192.168.20.132:8083",            "trace": "org.apache.kafka.connect.errors.ConnectException: no viable alternative at input 'CREATE DEFINER=`hiq_routines`@`localhost` PROCEDURE `book_non_ideal_manual_payments`(IN _myIban VARCHAR(28), IN _firstCom VARCHAR(50), IN _ibanLen INT(11))\\nBEGIN\\n\\n\\tDECLARE done INT DEFAULT FALSE;\\n\\tDECLARE v_clearing_route VARCHAR(6);\\n    DECLARE v_fclen INT(11);\\n    \\n    DECLARE v_iban VARCHAR(250);\\n\\tDECLARE v_clearingcash_id INT(11);\\n\\tDECLARE v_amount BIGINT(22);\\n\\tDECLARE v_comment VARCHAR(255);\\n\\tDECLARE v_date DATE;\\n\\tDECLARE v_currency_id INT(11);\\n\\tDECLARE v_teller INT(11);\\n\\tDECLARE v_int_account INT(11);\\n\\tDECLARE v_consumerIBAN VARCHAR(250);\\n\\tDECLARE v_openIdeals DECIMAL(8, 2);\\n\\tDECLARE v_autobook INT(11); \\n    \\n    DECLARE v_total_amount BIGINT(22);\\n    \\n    DECLARE m_error_text VARCHAR(255);\\n    \\n    DECLARE bookCursor CURSOR FOR\\n    SELECT \\n    *,\\n    int_account IS NOT NULL AND teller = 1\\n        AND (openIdeals IS NULL\\n        OR (100 * openIdeals < amount)) AS autobook\\n\\tFROM\\n    (SELECT \\n        RIGHT(LEFT(comment, v_fclen), _ibanLen) IBAN,\\n            id,\\n            amount,\\n            comment,\\n            date,\\n            currency_id\\n    FROM\\n        hiqtrading_p.v_riskgiro_clearingcash\\n    WHERE\\n        booking LIKE _myIban\\n            AND comment LIKE _firstCom\\n            AND date < CURDATE() - INTERVAL IF(WEEKDAY(CURDATE()) IN (0 , 1, 2), 5, 3) DAY\\n            AND spread_type = 0) IBANPayment\\n        LEFT JOIN\\n    (SELECT \\n        IBAN, count(*) teller, int_account\\n    FROM\\n        hiqadmin.v_riskgiro_client\\n    GROUP BY IBAN) x USING (IBAN)\\n        LEFT JOIN\\n    (SELECT \\n        consumerIBAN, SUM(sum)'\n\tat io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:230)\n\tat io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:207)\n\tat io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:536)\n\tat com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1095)\n\tat com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:943)\n\tat com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:580)\n\tat com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:825)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: io.debezium.text.ParsingException: no viable alternative at input 'CREATE DEFINER=`hiq_routines`@`localhost` PROCEDURE `book_non_ideal_manual_payments`(IN _myIban VARCHAR(28), IN _firstCom VARCHAR(50), IN _ibanLen INT(11))\\nBEGIN\\n\\n\\tDECLARE done INT DEFAULT FALSE;\\n\\tDECLARE v_clearing_route VARCHAR(6);\\n    DECLARE v_fclen INT(11);\\n    \\n    DECLARE v_iban VARCHAR(250);\\n\\tDECLARE v_clearingcash_id INT(11);\\n\\tDECLARE v_amount BIGINT(22);\\n\\tDECLARE v_comment VARCHAR(255);\\n\\tDECLARE v_date DATE;\\n\\tDECLARE v_currency_id INT(11);\\n\\tDECLARE v_teller INT(11);\\n\\tDECLARE v_int_account INT(11);\\n\\tDECLARE v_consumerIBAN VARCHAR(250);\\n\\tDECLARE v_openIdeals DECIMAL(8, 2);\\n\\tDECLARE v_autobook INT(11); \\n    \\n    DECLARE v_total_amount BIGINT(22);\\n    \\n    DECLARE m_error_text VARCHAR(255);\\n    \\n    DECLARE bookCursor CURSOR FOR\\n    SELECT \\n    *,\\n    int_account IS NOT NULL AND teller = 1\\n        AND (openIdeals IS NULL\\n        OR (100 * openIdeals < amount)) AS autobook\\n\\tFROM\\n    (SELECT \\n        RIGHT(LEFT(comment, v_fclen), _ibanLen) IBAN,\\n            id,\\n            amount,\\n            comment,\\n            date,\\n            currency_id\\n    FROM\\n        hiqtrading_p.v_riskgiro_clearingcash\\n    WHERE\\n        booking LIKE _myIban\\n            AND comment LIKE _firstCom\\n            AND date < CURDATE() - INTERVAL IF(WEEKDAY(CURDATE()) IN (0 , 1, 2), 5, 3) DAY\\n            AND spread_type = 0) IBANPayment\\n        LEFT JOIN\\n    (SELECT \\n        IBAN, count(*) teller, int_account\\n    FROM\\n        hiqadmin.v_riskgiro_client\\n    GROUP BY IBAN) x USING (IBAN)\\n        LEFT JOIN\\n    (SELECT \\n        consumerIBAN, SUM(sum)'\n\tat io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:40)\n\tat org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)\n\tat org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544)\n\tat org.antlr.v4.runtime.DefaultErrorStrategy.reportNoViableAlternative(DefaultErrorStrategy.java:310)\n\tat org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:136)\n\tat io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1121)\n\tat io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:849)\n\tat io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:68)\n\tat io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:41)\n\tat io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:80)\n\tat io.debezium.connector.mysql.MySqlSchema.applyDdl(MySqlSchema.java:308)\n\tat io.debezium.connector.mysql.BinlogReader.handleQueryEvent(BinlogReader.java:729)\n\tat io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:519)\n\t... 5 more\nCaused by: org.antlr.v4.runtime.NoViableAltException\n\tat org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2026)\n\tat org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:467)\n\tat org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:393)\n\tat io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:923)\n\t... 12 more\n"        }    ],    "type": "source"}
      

      Let me know if more information is required

       

              Unassigned Unassigned
              cedrik23 amir luzon (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: