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

Events for TRUNCATE TABLE not being emitted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 0.10.0.Beta2
    • None
    • mysql-connector
    • None

      Note: This ticket may (or may not) be a duplicate of:

      https://issues.jboss.org/browse/DBZ-413

      It would seem that TRUNCATE TABLE events are not being emitted to either the (for connector use only) database history topic nor the schema change topic.

      Both of these topics are receiving events for other DDL events, for example:

      null    {
        "source" : {
          "server" : "dev_db1"
        },
        "position" : {
          "ts_sec" : 1527864397,
          "file" : "dev-db1-bin.000006",
          "pos" : 1887472,
          "server_id" : 1,
          "event" : 1
        },
        "databaseName" : "vcmeta",
        "ddl" : "ALTER TABLE `twh` CHANGE `a` `a` INT(11) NULL DEFAULT NULL"
      }
      
      {"schema":{"type":"struct","fields":[{"type":"string","optional":false,"field":"databaseName"}],"optional":false,"name":"io.debezium.connector.mysql.SchemaChangeKey"},"payload":{"databaseName":"vcmeta"}}  {"schema":{"type":"struct","fields":[{"type":"struct","fields":[{"type":"string","optional":true,"field":"version"},{"type":"string","optional":false,"field":"name"},{"type":"int64","optional":false,"field":"server_id"},{"type":"int64","optional":false,"field":"ts_sec"},{"type":"string","optional":true,"field":"gtid"},{"type":"string","optional":false,"field":"file"},{"type":"int64","optional":false,"field":"pos"},{"type":"int32","optional":false,"field":"row"},{"type":"boolean","optional":true,"default":false,"field":"snapshot"},{"type":"int64","optional":true,"field":"thread"},{"type":"string","optional":true,"field":"db"},{"type":"string","optional":true,"field":"table"}],"optional":false,"name":"io.debezium.connector.mysql.Source","field":"source"},{"type":"string","optional":false,"field":"databaseName"},{"type":"string","optional":false,"field":"ddl"}],"optional":false,"name":"io.debezium.connector.mysql.SchemaChangeValue"},"payload":{"source":{"version":"0.7.5","name":"dev_db1","server_id":1,"ts_sec":1527864397,"gtid":null,"file":"dev-db1-bin.000006","pos":1887321,"row":0,"snapshot":false,"thread":null,"db":null,"table":null},"databaseName":"vcmeta","ddl":"ALTER TABLE `twh` CHANGE `a` `a` INT(11) NULL DEFAULT NULL"}}
      

      Any insight would be greatly appreciated. Thank you!

              jpechane Jiri Pechanec
              jaggaer-afoxson Adam Foxson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: