Debian Codegraph @

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

raw
1 # Bug #34565163: InnoDB: memcached.memc286_sdi_create fails due to content mismatch
2 # The content mismatch was caused after removing the overwriting of some table options during instant alter.
3 # This test checks that the options are set correctly for all algorithms, to avoid such errors in the future.
4
5 --source include/have_debug.inc
6
7 SET SESSION debug= '+d,skip_dd_table_access_check';
8
9 --let algo=0
10 while($algo<=2) {
11 CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a char(10));
12 INSERT INTO t1 VALUES(1, 'aa');
13 INSERT INTO t1 VALUES(2, 'bb');
14 SELECT options FROM mysql.tables WHERE name LIKE "%t1%";
15 if ($algo == 0) {
16 ALTER TABLE t1 ADD b VARCHAR(20), ALGORITHM=INSTANT;
17 }
18 if ($algo == 1) {
19 ALTER TABLE t1 ADD b VARCHAR(20), ALGORITHM=COPY;
20 }
21 if($algo == 2) {
22 ALTER TABLE t1 ADD b VARCHAR(20), ALGORITHM=INPLACE;
23 }
24 SELECT options FROM mysql.tables WHERE name LIKE "%t1%";
25 DROP TABLE t1;
26 --inc $algo
27 }