Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.6, 10.11, 11.1(EOL), 11.2, 11.4, 11.3.2, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 11.0(EOL), 11.3(EOL)
-
None
Description
Run the following statements, in which the ALTER statement is expected to execute successfully. However, the ALTER statement failed, and it seems that the table `mysql.innodb_table_stats` does not timely update its info.
CREATE TABLE t1 (c1 INT) ENGINE=InnoDB; |
CREATE TABLE t2 (c1 INT) ENGINE=InnoDB; |
ALTER TABLE t1 STATS_PERSISTENT 0; |
DROP TABLE IF EXISTS t1; |
ALTER TABLE t2 RENAME t1; -- [23000][1022] (conn=33) Can't write; duplicate key in table 'mysql.innodb_table_stats' |