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

ParsingException (MySQL/MariaDB): User specification with whitespace

    XMLWordPrintable

Details

    • False
    • None
    • False

    Description

      Bug report

      What Debezium connector do you use and what version?

      Debezium 2.3.2.Final

      What is the connector configuration?

      N/A

      What is the captured database version and mode of deployment?

      Amazon RDS for MariaDB 10.5

      What behaviour do you expect?

      The following DDL statement should be successfully parsed:

       

      GRANT SELECT, UPDATE, INSERT ON db_name.table_name TO 'my_user' @'%' 

       

      This is a valid statement in MariaDB and in MySQL:

      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 4
      Server version: 10.5.22-MariaDB-1:10.5.22+maria~ubu2004 mariadb.org binary distributionCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      MariaDB [(none)]> GRANT SELECT ON *.* TO `my_user` @`%` IDENTIFIED BY 'pwd';
      Query OK, 0 rows affected (0.038 sec)
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 9
      Server version: 8.1.0 MySQL Community Server - GPLCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
      affiliates. Other names may be trademarks of their respective
      owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      mysql> CREATE USER 'my_user' @'%' IDENTIFIED BY 'password';
      Query OK, 0 rows affected (0.03 sec)
      mysql> GRANT SELECT ON *.* TO `my_user` @`%`;
      Query OK, 0 rows affected (0.02 sec) 

       

      What behaviour do you see?

       

      io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'GRANT SELECT, UPDATE, INSERT ON db_name.table_name TO 'my_user' @'%''
      extraneous input '@'%'' expecting {<EOF>, '-'} 

       

       

      Do you see the same behaviour using the latest relesead Debezium version?

      Yes, issue also exists on latest main branch.

      Do you have the connector logs, ideally from start till finish?

      io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'GRANT SELECT, UPDATE, INSERT ON db_name.table_name TO 'my_user' @'%'' extraneous input '@'%'' expecting {<EOF>, '-'} 

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jochen-redhat Jochen Schalanda
              Jochen Schalanda
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: