Bug #114803 rename table failed
Submitted: 27 Apr 13:38 Modified: 29 Apr 10:31
Reporter: zongyi chen Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB Plugin storage engine Severity:S3 (Non-critical)
Version:8.0.28 OS:Any
Assigned to: CPU Architecture:Any
Tags: rename table

[27 Apr 13:38] zongyi chen
Description:
i write sql like 'rename table t1 to t2',but sometiome it failed, and error log reported.

DDL log insert : [DDL record: RENAME SPACE, id=256782009, thread_id=57027483, space_id=37756640, old_file_path=./test/t2.ibd, new_file_path=./test/t1.ibd]
DDL log delete : 256782009
DDL log insert : [DDL record: RENAME TABLE, id=256782010, thread_id=57027483, table_id=37827567, old_file_path=test/t2, new_file_path=test/t1]
DDL log delete : 256782010
DDL log post ddl : begin for thread id : 57027483
DDL log replay : [DDL record: RENAME TABLE, id=256782010, thread_id=57027483, table_id=37827567, old_file_path=test/t2, new_file_path=test/t1]
DDL log replay : [DDL record: RENAME SPACE, id=256782009, thread_id=57027483, space_id=37756640, old_file_path=./test/t2.ibd, new_file_path=./test/t1.ibd]
Tablespace ID already maps to: './test/t1.ibd', rename ignored.
DDL log post ddl : end for thread id : 57027483

Second last row log confused me.i read source code, i do not know What would cause the log. because acrroding to the log '[DDL record: RENAME SPACE, id=256782009, thread_id=57027483, space_id=37756640, old_file_path=./test/t2.ibd, new_file_path=./test/t1.ibd]', mysqld already change ibd file name,but it seem it change failed or something, but no more error log.

How to repeat:
Failure to reproduce stably
[29 Apr 10:31] MySQL Verification Team
Hi Mr. chen,

Thank you so much for your bug report.

However, let us inform you that this forum is intended for the bug reports with a fully repeatable test cases. Each of those test cases should consist of the set of SQL statements that always leads to the problem described, in your case to the failure in the renaming of the table.

We have not received such a test case from you, but we shall wait that you provide us with one.

Also, let us inform you that 8.0.28 is an old release and current release, on which we run repeatable test cases is 8.0.36.

Can't repeat.