Skip to content

Rename tables DDL may use wrong table info for partition tables #4447

@lidezhu

Description

@lidezhu

What did you do?

When TiCDC handles a RENAME TABLES DDL that contains partition tables, it may use the wrong table info to determine whether the current renamed table is partitioned and to derive its physical table IDs.

This can lead to incorrect results in the generated DDL event, including:

  • BlockedTables
  • UpdatedSchemas
  • dispatcher-facing TableInfo

A statement like the following may trigger the issue:

RENAME TABLE db1.normal_t TO db1.normal_t_new, db1.partition_t TO db1.partition_t_new;

What did you expect to see?

No response

What did you see instead?

None

Versions of the cluster

Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

(paste TiDB cluster version here)

Upstream TiKV version (execute tikv-server --version):

(paste TiKV version here)

TiCDC version (execute cdc version):

(paste TiCDC version here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions