Debian Codegraph @

mysql-test/suite/engines/funcs/t/tc_rename_error.test

raw
1 --disable_warnings
2 DROP TABLE IF EXISTS t1,t2;
3 --enable_warnings
4 CREATE TABLE t1(c1 INTEGER NULL);
5 CREATE TABLE t2(c1 INTEGER NULL);
6 SHOW TABLES;
7 let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
8 --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
9 SHOW CREATE TABLE t1;
10 --error ER_TABLE_EXISTS_ERROR
11 RENAME TABLE t2 TO t1;
12 --error ER_NO_SUCH_TABLE
13 RENAME TABLE t3 TO t1;
14 --error 1146
15 RENAME TABLE t3 TO doesnotexist.t1;
16 SHOW TABLES;
17 let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
18 --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
19 SHOW CREATE TABLE t1;
20 let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
21 --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" " PAGE_CHECKSUM=1" ""
22 SHOW CREATE TABLE t2;
23 DROP TABLE t2;
24 SHOW TABLES;
25
26 DROP TABLE t1;