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

Connector throws error when doing ad-hoc snapshot

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 1.6.0.Final
    • mysql-connector
    • None
    • False
    • False
    • undefined

      Debezium version: 1.6.0.Final

      Mysql version: 8.0.21

       note the tables to adhoc snapshot don't have primary keys.

      Config:

      {"connector.class":"MySqlConnector",
      "snapshot.locking.mode":"none",
      "database.user":"root",
      "database.history.kafka.topic":"dbhistory",
      "database.history.kafka.bootstrap.servers":"kafka-service:29092",
      "database.tablename.case.insensitive":"true",
      "database.server.name":"test",
      "tombstones.on.delete":"false",
      "database.hostname":"mysql",
      "database.password":"pass",
      "signal.data.collection":"data_pipeline.debezium_signal",
      "name":"connector-test",
      "database.history.skip.unparseable.ddl":"true",
      "table.include.list":"db.table1,db.table2,data_pipeline.debezium_signal",
      "database.include.list":"db,data_pipeline"}
      

       

      Error logs here:

      Caused by: io.debezium.DebeziumException: Database error while executing incremental snapshot\n\tat io.debezium.pipeline.source.snapshot.incremental.SignalBasedIncrementalSnapshotChangeEventSource.readChunk(SignalBasedIncrementalSnapshotChangeEventSource.java:257)\n\tat io.debezium.pipeline.source.snapshot.incremental.SignalBasedIncrementalSnapshotChangeEventSource.addDataCollectionNamesToSnapshot(SignalBasedIncrementalSnapshotChangeEventSource.java:273)\n\tat io.debezium.pipeline.signal.ExecuteSnapshot.arrived(ExecuteSnapshot.java:64)\n\tat io.debezium.pipeline.signal.Signal.process(Signal.java:136)\n\tat io.debezium.pipeline.signal.Signal.process(Signal.java:180)\n\tat io.debezium.pipeline.EventDispatcher$2.changeRecord(EventDispatcher.java:227)\n\tat io.debezium.relational.RelationalChangeRecordEmitter.emitCreateRecord(RelationalChangeRecordEmitter.java:77)\n\tat io.debezium.relational.RelationalChangeRecordEmitter.emitChangeRecords(RelationalChangeRecordEmitter.java:45)\n\tat io.debezium.pipeline.EventDispatcher.dispatchDataChangeEvent(EventDispatcher.java:217)\n\t... 11 more\nCaused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC LIMIT 1' at line 1\n\tat com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\n\tat com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)\n\tat com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\n\tat com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1200)\n\tat io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:648)\n\tat io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:517)\n\tat io.debezium.pipeline.source.snapshot.incremental.SignalBasedIncrementalSnapshotChangeEventSource.readChunk(SignalBasedIncrementalSnapshotChangeEventSource.java:220)\n\t... 19 more\n"
      

       

      Quick goolge got me this, might be related?

      https://stackoverflow.com/questions/58891993/error-1064you-have-an-error-in-your-sql-syntax-mysql-select-query

              Unassigned Unassigned
              mzhang8861 Meng Zhang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: