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

Support MySQL Dual Passwords in DDL Parser

    XMLWordPrintable

Details

    Description

      MySQL 8.0.14 introduced the ability to have dual passwords for a user, and allows statements like

      ALTER USER user@host IDENTIFIED BY 'newpassword' RETAIN CURRENT PASSWORD;
      

      This is documented at https://dev.mysql.com/doc/refman/8.0/en/password-management.html#dual-passwords

      However, this causes Debezium to crash, requiring an operator to parse the binary transaction log for the GTID after the statement, and to change the offsets in order for Debezium to skip over that transaction.

      Specific crash exception is 

         level: ERROR
         level_value: 40000
         logger_name: org.apache.kafka.connect.runtime.WorkerTask
         message: WorkerSourceTask{id=mysql-connector-tranform-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted
         stack_trace: 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:42)at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:369)at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1118)at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:966)at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:606)at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:850)at java.base/java.lang.Thread.run(Thread.java:834)Caused by: io.debezium.DebeziumException: Error processing binlog event... 6 common frames omittedCaused by: io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'ALTER USER 'monitor'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*REDACTED*' RETAIN CURRENT PASSWORD'mismatched input 'RETAIN' expecting {<EOF>, '--'}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.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:915)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:82)at io.debezium.connector.mysql.MySqlDatabaseSchema.parseDdl(MySqlDatabaseSchema.java:210)at io.debezium.connector.mysql.MySqlDatabaseSchema.parseStreamingDdl(MySqlDatabaseSchema.java:197)at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleQueryEvent(MySqlStreamingChangeEventSource.java:574)at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:352)... 5 common frames omittedCaused by: org.antlr.v4.runtime.InputMismatchException: nullat org.antlr.v4.runtime.DefaultErrorStrategy.sync(DefaultErrorStrategy.java:270)at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:900)... 12 common frames omitted
         stream: stdout
         thread_name: task-thread-mysql-connector-tranform-0
      

      Attachments

        Activity

          People

            ccranfor@redhat.com Chris Cranford
            ernstae Andrew Ernst (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: