Debian Codegraph @

mysql-test/suite/innodb/t/innodb_rename_index_err.test

raw
1 #
2
3 -- source include/have_debug.inc
4
5 --disable_query_log
6 call mtr.add_suppression("Cannot calculate statistics for table `test`\.`t` because the \.ibd file is missing");
7 call mtr.add_suppression("Cannot find index i1 in InnoDB index dictionary");
8 call mtr.add_suppression("Build InnoDB index translation table");
9 call mtr.add_suppression("Table test/t contains 0 indexes inside InnoDB, which is different from the number of indexes 1 defined in MySQL");
10 call mtr.add_suppression("Innodb could not find key no 0 with name i1 from dict cache for table test/t");
11 call mtr.add_suppression("Table test/t contains fewer indexes inside InnoDB than are defined in the MySQL .frm file");
12 --enable_query_log
13
14 CREATE TABLE t (c1 INT, c2 INT, KEY i2 (c2)) ENGINE=INNODB;
15
16 SET DEBUG='+d,ib_rename_index_fail1';
17 -- error ER_LOCK_DEADLOCK
18 ALTER TABLE t RENAME INDEX i2 to x, ALGORITHM=INPLACE;
19 SET DEBUG='-d,ib_rename_index_fail1';
20
21 SET DEBUG='+d,ib_rename_index_fail2';
22 ALTER TABLE t RENAME INDEX i2 to x, ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE;
23 SET DEBUG='-d,ib_rename_index_fail2';
24 SELECT index_name, stat_description
25 FROM mysql.innodb_index_stats
26 WHERE table_name = 't' AND stat_name LIKE 'n_diff%'
27 ORDER BY 1, 2;
28
29 SET DEBUG='+d,ib_rename_index_fail3';
30 ALTER TABLE t RENAME INDEX x to y, ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE;
31 SET DEBUG='-d,ib_rename_index_fail3';
32 SELECT index_name, stat_description
33 FROM mysql.innodb_index_stats
34 WHERE table_name = 't' AND stat_name LIKE 'n_diff%'
35 ORDER BY 1, 2;
36
37 DROP TABLE t;