MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
partition_mgm_crash.inc
1 # collection of tests which crashes the server and checks recovery.
2 # also using error injection to test recovery of failures.
3 # uses $DATADIR and $engine
4 
5 --echo #
6 --echo # Bug#53676: Unexpected errors and possible table corruption on
7 --echo # ADD PARTITION and LOCK TABLE
8 --echo # Bug#53770: Server crash at handler.cc:2076 on LOAD DATA
9 --echo # after timed out COALESCE PARTITION
10 --echo # Extended crash recovery testing of fast_alter_partition_table.
11 call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
12 
13 let $create_statement= CREATE TABLE t1 (a INT, b VARCHAR(64))
14 ENGINE = $engine
15 PARTITION BY LIST (a)
16 (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
17  PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
18 let $insert_statement= INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
19 
20 let $crash_statement= ALTER TABLE t1 ADD PARTITION
21 (PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
22 --source suite/parts/inc/partition_crash_add.inc
23 let $fail_statement= $crash_statement;
24 --source suite/parts/inc/partition_fail_add.inc
25 let $crash_statement= ALTER TABLE t1 DROP PARTITION p10;
26 --source suite/parts/inc/partition_crash_drop.inc
27 let $fail_statement= $crash_statement;
28 --source suite/parts/inc/partition_fail_drop.inc
29 let $crash_statement= ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
30 (PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
31  PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
32 --source suite/parts/inc/partition_crash_change.inc
33 let $fail_statement= $crash_statement;
34 --source suite/parts/inc/partition_fail_change.inc