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

Debezium MySQL could not parse certain grant privileges.

XMLWordPrintable

    • False
    • None
    • False
    • Critical

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      Debezium version: 2.4.2.Final , MySQL Connector

      What is the connector configuration?

      .with("name", "backoffice-mysql-connector")
      .with("connector.class", "io.debezium.connector.mysql.MySqlConnector")
      .with("offset.storage", "org.apache.kafka.connect.storage.FileOffsetBackingStore")
      // .with("offset.storage.file.filename", offsetStorageTempFile.getAbsolutePath())
      .with("offset.storage.file.filename", offSetFilePath)
      .with("offset.flush.interval.ms", "60000")
      .with("database.hostname", backofficeDbHost)
      .with("database.port", backofficeDbPort)
      .with("database.user", backofficeDbUsername)
      .with("database.password", backofficeDbPassword)
      .with("database.dbname", backofficeDbName)
      .with("database.include.list", backofficeDbName)
      .with("include.schema.changes", "false")
      .with("database.allowPublicKeyRetrieval", "true")
      .with("database.history.skip.unparseable.ddl", "true")
      .with("database.schema.history.internal.store.only.captured.tables.ddl","true")
      .with("database.schema.history.internal.store.only.captured.databases.ddl","true")
      .with("database.server.id", System.currentTimeMillis())
      .with("database.server.name",backofficeDbHost+"-"+backofficeDbName)
      .with("table.whitelist", backofficeTableWhiteList)
      .with("table.include.list","user_kyc")
      .with("topic.prefix", "backoffice-connector")
      .with("schema.history.internal",
      "io.debezium.storage.file.history.FileSchemaHistory")
      .with("schema.history.internal.file.filename",
      dbHistoryPath)
      .with("time.precision.mode","connect")
      .with("event.processing.failure.handling.mode","skip")
      .with("skip.messages.without.change","true")
      .with("snapshot.mode","schema_only")
      // Error Handling and Retry Policies
      .with("errors.retry.delay", "1000") // 1 second delay between retries
      .with("errors.retry.max.delay", "60000") // Maximum 60 seconds between retries
      .with("errors.log.enable", "true") // Enable error logging

      What is the captured database version and mode of depoyment?

      (E.g. on-premises, with a specific cloud provider, etc.)

      MySQL : 8.2 on-premises

      What behaviour do you expect?

      I would expect it to parse these privileges or DDL statements.

      What behaviour do you see?

      Exception while parsing certain DDL Grant statements.

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

      (Ideally, also verify with latest Alpha/Beta/CR version)

      Yes , same error in latest version aswell.

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

      (You might be asked later to provide DEBUG/TRACE level log)

      Yes.

      .425180628+05:45 stdout F Caused by: io.debezium.DebeziumException: Error processing binlog event
      2023-12-12T16:38:58.425184032+05:45 stdout F     ... 7 common frames omitted

      2023-12-12T16:38:58.425187779+05:45 stdout F Caused by: io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'GRANT APPLICATION_PASSWORD_ADMIN, AUDIT_ABORT_EXEMPT, AUDIT_ADMIN, AUTHENTICATION_POLICY_ADMIN, BACKUP_ADMIN, BINLOG_ADMIN, BINLOG_ENCRYPTION_ADMIN, CLONE_ADMIN, CONNECTION_ADMIN, ENCRYPTION_KEY_ADMIN, FIREWALL_EXEMPT, FLUSH_OPTIMIZER_COSTS, FLUSH_STATUS, FLUSH_TABLES, FLUSH_USER_RESOURCES, GROUP_REPLICATION_ADMIN, GROUP_REPLICATION_STREAM, INNODB_REDO_LOG_ARCHIVE, INNODB_REDO_LOG_ENABLE, PASSWORDLESS_USER_ADMIN, PERSIST_RO_VARIABLES_ADMIN, REPLICATION_APPLIER, REPLICATION_SLAVE_ADMIN, RESOURCE_GROUP_ADMIN, RESOURCE_GROUP_USER, ROLE_ADMIN, SENSITIVE_VARIABLES_OBSERVER, SERVICE_CONNECTION_ADMIN, SESSION_VARIABLES_ADMIN, SET_USER_ID, SHOW_ROUTINE, SYSTEM_USER, SYSTEM_VARIABLES_ADMIN, TABLE_ENCRYPTION_ADMIN, TELEMETRY_LOG_ADMIN, XA_RECOVER_ADMIN ON . TO 'test_db'@'11.151.167.5''

       stdout F no viable alternative at input 'GRANT APPLICATION_PASSWORD_ADMIN, AUDIT_ABORT_EXEMPT, AUDIT_ADMIN, AUTHENTICATION_POLICY_ADMIN'
       stdout F     at io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:43)
       stdout F     at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
       stdout F     at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:543)
       stdout F     at org.antlr.v4.runtime.DefaultErrorStrategy.reportNoViableAlternative(DefaultErrorStrategy.java:310)
       stdout F     at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:136)
       stdout F     at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1261)
       stdout F     at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:979)
       stdout F     at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:74)
       stdout F     at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:46)
       stdout F     at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:78)
       stdout F     at io.debezium.connector.mysql.MySqlDatabaseSchema.parseDdl(MySqlDatabaseSchema.java:213)
       stdout F     at io.debezium.connector.mysql.MySqlDatabaseSchema.parseStreamingDdl(MySqlDatabaseSchema.java:199)
       stdout F     at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleQueryEvent(MySqlStreamingChangeEventSource.java:590)
       stdout F     at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$15(MySqlStreamingChangeEventSource.java:894)
       stdout F     at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:372)
       stdout F     ... 6 common frames omitted
       stdout F Caused by: org.antlr.v4.runtime.NoViableAltException: null
       stdout F     at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2028)
       stdout F     at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:467)
       stdout F     at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:393)
       stdout F     at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1055)
       stdout F     ... 15 common frames omitted
       stdout F 

      How to reproduce the issue using our tutorial deployment?

      Just run the embeded debezium in spring boot and try to give these privileges on mysql db.

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

       

      Enhancement

      Which use case/requirement will be addressed by the proposed feature?

      It it resolve the bug : DDL parsing exception.

      Implementation ideas (optional)

      <Your answer>

              anmohant Anisha Mohanty
              raju.bhattarai Raju Bhattarai (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: