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

Mariadb and Mysql have different syntax

XMLWordPrintable

    • False
    • None
    • False

      Currently, Debezium has one parser for MariaDb and Mysql, located at:

      debezium-ddl-parser/src/main/antlr4/.../MySqlParser.g4

      and the tests located at:

      debezium-ddl-parser/src/test/resources/mysql/...

      These tests run in MariaDB but no in MySql.

      In the Parser code, specific sections running just in MariaDb have the comment:

      //MariaDB-specific only

      To give an example, these instructions work just in MariaDB but not in MySQL

      • ALTER TABLE customers ADD COLUMN IF NOT EXISTS column_a INT;
      • CREATE OR REPLACE TABLE `t_table`
      • ... DEFINER = CURRENT_ROLE{}
      • ... IDENTIFIED VIA

      I suggest divide the parser inĀ  MariadbParser.g4 and MysSqlParser.g4

            Unassigned Unassigned
            urule Raul Estrada (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: