File: atomic_rename_debug_database.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (51 lines) | stat: -rw-r--r-- 1,835 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--echo #
--echo # Test rename table with fulltext index crash/recovery rollback.
--echo # The table should be renamed from one database to another so
--echo # that all tablespaces of aux tables would be renamed too.
--echo #

--source include/big_test.inc
--source include/have_debug.inc
--source include/not_valgrind.inc
--source include/not_crashrep.inc

--disable_query_log
CALL mtr.add_suppression("\\[Warning\\] .*MY-\\d+.* Tablespace .*, name '.*', file '*.*' is missing!");
CALL mtr.add_suppression("Operating system error number .* in a file operation.");
CALL mtr.add_suppression("The error means the system cannot find the path specified.");
call mtr.add_suppression("Cannot open datafile for read-only: .*");
--enable_query_log

LET $innodb_ddl_log_crash_reset_debug_orig = `SELECT @@innodb_ddl_log_crash_reset_debug`;
CREATE DATABASE db_a;
CREATE DATABASE db_b;

let $table_name= db_a.t1;
let $rename_table_name= db_b.t2;

let $create_statement= CREATE TABLE $table_name
(a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(100), c INT NOT NULL, FULLTEXT KEY b_k(b));

let $insert_statement= INSERT INTO $table_name VALUES (1, "Filler1", 1),
(2, "filler2", 2), (3, "FILLER3", 3), (4, "Filler4", 4), (5, "5", 5),
(6, "filler6", 6);

let $test_free= 0;
let $test_delete= 0;
let $test_rename= 1;
let $test_drop= 0;
let $rename_flag= 1;

--disable_result_log
let $crash_statement= RENAME TABLE $table_name to $rename_table_name;
--source ../mysql-test/suite/innodb/include/ddl_crash_statement.inc

eval SET GLOBAL innodb_ddl_log_crash_reset_debug = $innodb_ddl_log_crash_reset_debug_orig;

DROP DATABASE db_a;
DROP DATABASE db_b;

-- disable_query_log
call mtr.add_suppression("\\[ERROR\\].*Scanned file '.*' for tablespace .* cannot be opened because it is not in a sub-directory named for the schema");
-- enable_query_log