| 1 |
--echo # |
| 2 |
--echo # Test rename table with fulltext index crash/recovery rollback. |
| 3 |
--echo # The table should be renamed from one database to another so |
| 4 |
--echo # that all tablespaces of aux tables would be renamed too. |
| 5 |
--echo # |
| 6 |
|
| 7 |
--source include/big_test.inc |
| 8 |
--source include/have_debug.inc |
| 9 |
--source include/not_valgrind.inc |
| 10 |
--source include/not_crashrep.inc |
| 11 |
|
| 12 |
--disable_query_log |
| 13 |
CALL mtr.add_suppression("\\[Warning\\] .*MY-\\d+.* Tablespace .*, name '.*', file '*.*' is missing!"); |
| 14 |
CALL mtr.add_suppression("Operating system error number .* in a file operation."); |
| 15 |
CALL mtr.add_suppression("The error means the system cannot find the path specified."); |
| 16 |
call mtr.add_suppression("Cannot open datafile for read-only: .*"); |
| 17 |
--enable_query_log |
| 18 |
|
| 19 |
LET $innodb_ddl_log_crash_reset_debug_orig = `SELECT @@innodb_ddl_log_crash_reset_debug`; |
| 20 |
CREATE DATABASE db_a; |
| 21 |
CREATE DATABASE db_b; |
| 22 |
|
| 23 |
let $table_name= db_a.t1; |
| 24 |
let $rename_table_name= db_b.t2; |
| 25 |
|
| 26 |
let $create_statement= CREATE TABLE $table_name |
| 27 |
(a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(100), c INT NOT NULL, FULLTEXT KEY b_k(b)); |
| 28 |
|
| 29 |
let $insert_statement= INSERT INTO $table_name VALUES (1, "Filler1", 1), |
| 30 |
(2, "filler2", 2), (3, "FILLER3", 3), (4, "Filler4", 4), (5, "5", 5), |
| 31 |
(6, "filler6", 6); |
| 32 |
|
| 33 |
let $test_free= 0; |
| 34 |
let $test_delete= 0; |
| 35 |
let $test_rename= 1; |
| 36 |
let $test_drop= 0; |
| 37 |
let $rename_flag= 1; |
| 38 |
|
| 39 |
--disable_result_log |
| 40 |
let $crash_statement= RENAME TABLE $table_name to $rename_table_name; |
| 41 |
--source ../mysql-test/suite/innodb/include/ddl_crash_statement.inc |
| 42 |
|
| 43 |
eval SET GLOBAL innodb_ddl_log_crash_reset_debug = $innodb_ddl_log_crash_reset_debug_orig; |
| 44 |
|
| 45 |
DROP DATABASE db_a; |
| 46 |
DROP DATABASE db_b; |
| 47 |
|
| 48 |
-- disable_query_log |
| 49 |
call mtr.add_suppression("\\[ERROR\\].*Scanned file '.*' for tablespace .* cannot be opened because it is not in a sub-directory named for the schema"); |
| 50 |
-- enable_query_log |
| 51 |
|