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

Missing "previousId" property with parsing the rename statement in kafka history topic

    XMLWordPrintable

Details

    • False
    • None
    • False

    Description

      Execute ddl statement:
      rename table _test_no_pk to _test_no_pk_old;
      rename table _test_no_pk_old to __test_no_pk_old;

      History topic:
      {
      "source" :

      { "server" : "test_avro" }

      ,
      "position" :

      { "transaction_id" : null, "ts_sec" : 1657378800, "file" : "mysql-bin.000013", "pos" : 209482, "server_id" : 112233 }

      ,
      "ts_ms" : 1657378800543,
      "databaseName" : "workdb",
      "ddl" : "rename table _test_no_pk to _test_no_pk_old",
      "tableChanges" : [ {
      "type" : "ALTER",
      "id" : "\"workdb\".\"_test_no_pk_old\"",
      "table" : {
      "defaultCharsetName" : "utf8mb4",
      "primaryKeyColumnNames" : [ "c1" ],
      "columns" : [

      { "name" : "c1", "jdbcType" : 4, "typeName" : "INT", "typeExpression" : "INT", "charsetName" : null, "position" : 1, "optional" : false, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : false, "enumValues" : [ ] }

      ,

      { "name" : "c2", "jdbcType" : 93, "typeName" : "DATETIME", "typeExpression" : "DATETIME", "charsetName" : null, "position" : 2, "optional" : false, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : true, "defaultValueExpression" : "1970-01-01 00:00:00", "enumValues" : [ ] }

      ,

      { "name" : "c3", "jdbcType" : 2014, "typeName" : "TIMESTAMP", "typeExpression" : "TIMESTAMP", "charsetName" : null, "position" : 3, "optional" : false, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : true, "defaultValueExpression" : "1970-01-01 00:00:00", "enumValues" : [ ] }

      ,

      { "name" : "c4", "jdbcType" : 12, "typeName" : "VARCHAR", "typeExpression" : "VARCHAR", "charsetName" : "utf8mb4", "length" : 255, "position" : 4, "optional" : true, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : true, "defaultValueExpression" : "varchar", "enumValues" : [ ] }

      ,

      { "name" : "c5", "jdbcType" : -5, "typeName" : "BIGINT", "typeExpression" : "BIGINT", "charsetName" : null, "position" : 5, "optional" : false, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : true, "defaultValueExpression" : "-1", "enumValues" : [ ] }

      ,

      { "name" : "c6", "jdbcType" : -5, "typeName" : "BIGINT", "typeExpression" : "BIGINT", "charsetName" : null, "position" : 6, "optional" : false, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : true, "defaultValueExpression" : "0", "enumValues" : [ ] }

      ]
      },
      "comment" : null
      } ]
      }

      Expect history topic message:

      {
      "source" :

      { "server" : "test_avro" }

      ,
      "position" :

      { "transaction_id" : null, "ts_sec" : 1657382444, "file" : "mysql-bin.000013", "pos" : 210918, "server_id" : 112233 }

      ,
      "ts_ms" : 1657382444563,
      "databaseName" : "workdb",
      "ddl" : "rename table _test_no_pk_old to __test_no_pk_old",
      "tableChanges" : [ {
      "type" : "ALTER",
      "id" : "\"workdb\".\"__test_no_pk_old\"",
      "previousId" : "\"workdb\".\"_test_no_pk_old\"",
      "table" : {
      "defaultCharsetName" : "utf8mb4",
      "primaryKeyColumnNames" : [ "c1" ],
      "columns" : [

      { "name" : "c1", "jdbcType" : 4, "typeName" : "INT", "typeExpression" : "INT", "charsetName" : null, "position" : 1, "optional" : false, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : false, "enumValues" : [ ] }

      ,

      { "name" : "c2", "jdbcType" : 93, "typeName" : "DATETIME", "typeExpression" : "DATETIME", "charsetName" : null, "position" : 2, "optional" : false, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : true, "defaultValueExpression" : "1970-01-01 00:00:00", "enumValues" : [ ] }

      ,

      { "name" : "c3", "jdbcType" : 2014, "typeName" : "TIMESTAMP", "typeExpression" : "TIMESTAMP", "charsetName" : null, "position" : 3, "optional" : false, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : true, "defaultValueExpression" : "1970-01-01 00:00:00", "enumValues" : [ ] }

      ,

      { "name" : "c4", "jdbcType" : 12, "typeName" : "VARCHAR", "typeExpression" : "VARCHAR", "charsetName" : "utf8mb4", "length" : 255, "position" : 4, "optional" : true, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : true, "defaultValueExpression" : "varchar", "enumValues" : [ ] }

      ,

      { "name" : "c5", "jdbcType" : -5, "typeName" : "BIGINT", "typeExpression" : "BIGINT", "charsetName" : null, "position" : 5, "optional" : false, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : true, "defaultValueExpression" : "-1", "enumValues" : [ ] }

      ,

      { "name" : "c6", "jdbcType" : -5, "typeName" : "BIGINT", "typeExpression" : "BIGINT", "charsetName" : null, "position" : 6, "optional" : false, "autoIncremented" : false, "generated" : false, "comment" : null, "hasDefaultValue" : true, "defaultValueExpression" : "0", "enumValues" : [ ] }

      ]
      },
      "comment" : null
      } ]
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            ywyuewei Harvey Yue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: