The issue of mismatch between TABLE_ID in DDL_JOBS and TIDB_TABLE_ID in TABLES

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 有关DDL_JOBS的TABLE_ID和TABLES中的TIDB_TABLE_ID不匹配的问题

| username: TIDB救我狗命

The TiDB_TABLE_ID of the TiktokAd table in my current TABLES table is 1494377, but the ID of this table in DDL_JOBS is 66965. I remember these two IDs should be associated with each other, so why is there an inconsistency?

| username: 啦啦啦啦啦 | Original post link

Have you ever performed a truncate? Truncate will cause the table ID to change.

| username: TIDB救我狗命 | Original post link

I found it. The table_id changes due to truncate. Thank you, master.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.