Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail to rename table to another db‘s table #11963

Open
hongyunyan opened this issue Jan 2, 2025 · 0 comments · May be fixed by #11964
Open

fail to rename table to another db‘s table #11963

hongyunyan opened this issue Jan 2, 2025 · 0 comments · May be fixed by #11964
Labels
area/ticdc Issues or PRs related to TiCDC. type/bug The issue is confirmed as a bug.

Comments

@hongyunyan
Copy link
Collaborator

What did you do?

  1. tiup playground make two clusters, and create changefeed
use test;
create table t1 (a int primary key, b int);
insert into t1 values(1,2);
create database d2;
rename table t1 to d2.t2;

What did you expect to see?

ddl and dml works well

What did you see instead?

[2025/01/02 10:31:31.114 +08:00] [ERROR] [ddl_sink.go:251] ["Execute DDL failed"] [namespace=default] [changefeed=test-1] [DDL="{"StartTs":455025635765780483,"CommitTs":455025635765780486,"Query":"RENAME TABLE t1 TO d2.t2","TableInfo":{"id":104,"name":{"O":"t2","L":"t2"},"charset":"utf8mb4","collate":"utf8mb4_bin","cols":[{"id":1,"name":{"O":"a","L":"a"},"offset":0,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":3,"Flag":4099,"Flen":11,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":2,"name":{"O":"b","L":"b"},"offset":1,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":3,"Flag":0,"Flen":11,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2}],"index_info":null,"constraint_info":null,"fk_info":null,"state":5,"pk_is_handle":true,"is_common_handle":false,"common_handle_version":0,"comment":"","auto_inc_id":0,"auto_id_cache":0,"auto_rand_id":0,"max_col_id":2,"max_idx_id":0,"max_fk_id":0,"max_cst_id":0,"update_timestamp":455025635529588746,"old_schema_id":2,"ShardRowIDBits":0,"max_shard_row_id_bits":0,"auto_random_bits":0,"auto_random_range_bits":0,"pre_split_regions":0,"partition":null,"compression":"","view":null,"sequence":null,"Lock":null,"version":5,"tiflash_replica":null,"is_columnar":false,"temp_table_type":0,"cache_table_status":0,"policy_ref_info":null,"stats_options":null,"exchange_partition_info":null,"ttl_info":null,"revision":0,"SchemaID":106,"TableName":{"Schema":"d2","Table":"t2","TableID":104,"IsPartition":false},"Version":455025635765780486,"RowColumnsOffset":{"1":0,"2":1},"ColumnsFlag":{"1":11,"2":65},"HandleIndexID":-1,"IndexColumnsOffset":[[0]]},"PreTableInfo":{"id":104,"name":{"O":"t1","L":"t1"},"charset":"utf8mb4","collate":"utf8mb4_bin","cols":[{"id":1,"name":{"O":"a","L":"a"},"offset":0,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":3,"Flag":4099,"Flen":11,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":2,"name":{"O":"b","L":"b"},"offset":1,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":3,"Flag":0,"Flen":11,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2}],"index_info":[],"constraint_info":null,"fk_info":[],"state":5,"pk_is_handle":true,"is_common_handle":false,"common_handle_version":0,"comment":"","auto_inc_id":0,"auto_id_cache":0,"auto_rand_id":0,"max_col_id":2,"max_idx_id":0,"max_fk_id":0,"max_cst_id":0,"update_timestamp":455025635529588746,"ShardRowIDBits":0,"max_shard_row_id_bits":0,"auto_random_bits":0,"auto_random_range_bits":0,"pre_split_regions":0,"partition":null,"compression":"","view":null,"sequence":null,"Lock":null,"version":5,"tiflash_replica":null,"is_columnar":false,"temp_table_type":0,"cache_table_status":0,"policy_ref_info":null,"stats_options":null,"exchange_partition_info":null,"ttl_info":null,"revision":0,"SchemaID":2,"TableName":{"Schema":"test","Table":"t1","TableID":104,"IsPartition":false},"Version":455025635529588752,"RowColumnsOffset":{"1":0,"2":1},"ColumnsFlag":{"1":11,"2":65},"HandleIndexID":-1,"IndexColumnsOffset":[[0]]},"Type":14,"Done":{},"Charset":"","Collate":"","IsBootstrap":false,"BDRRole":"","SQLMode":1436549152}"] [error="Error 1146 (42S02): Table 'd2.t1' doesn't exist"] [errorVerbose="Error 1146 (42S02): Table 'd2.t1' doesn't exist\ngithub.com/pingcap/errors.AddStack\n\tgithub.com/pingcap/[email protected]/errors.go:178\ngithub.com/pingcap/errors.Trace\n\tgithub.com/pingcap/[email protected]/juju_adaptor.go:15\ngithub.com/pingcap/tiflow/cdc/sink/ddlsink/mysql.(*DDLSink).WriteDDLEvent\n\tgithub.com/pingcap/tiflow/cdc/sink/ddlsink/mysql/mysql_ddl_sink.go:132\ngithub.com/pingcap/tiflow/cdc/owner.(*ddlSinkImpl).writeDDLEvent.func1\n\tgithub.com/pingcap/tiflow/cdc/owner/ddl_sink.go:245\ngithub.com/pingcap/tiflow/cdc/owner.(*ddlSinkImpl).retrySinkAction\n\tgithub.com/pingcap/tiflow/cdc/owner/ddl_sink.go:165\ngithub.com/pingcap/tiflow/cdc/owner.(*ddlSinkImpl).observedRetrySinkAction.func1\n\tgithub.com/pingcap/tiflow/cdc/owner/ddl_sink.go:197\nruntime.goexit\n\truntime/asm_amd64.s:1650"]

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)
@hongyunyan hongyunyan added area/ticdc Issues or PRs related to TiCDC. type/bug The issue is confirmed as a bug. labels Jan 2, 2025
@lidezhu lidezhu linked a pull request Jan 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ticdc Issues or PRs related to TiCDC. type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant