1
# test the auto-recover (--myisam-recover) of partitioned myisam tables
3
call mtr.add_suppression("./test/t1_will_crash");
4
call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc");
6
--source include/have_partition.inc
9
drop table if exists t1_will_crash;
14
CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM;
15
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
18
--echo # replacing t1.MYI with a corrupt + unclosed one created by doing:
19
--echo # 'create table t1 (a int key(a))' head -c1024 t1.MYI > corrupt_t1.MYI
20
let $MYSQLD_DATADIR= `select @@datadir`;
21
--remove_file $MYSQLD_DATADIR/test/t1_will_crash.MYI
22
--copy_file std_data/corrupt_t1.MYI $MYSQLD_DATADIR/test/t1_will_crash.MYI
23
SELECT * FROM t1_will_crash;
24
DROP TABLE t1_will_crash;
25
CREATE TABLE t1_will_crash (a INT, KEY (a))
29
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
31
--echo # replacing t1#P#p1.MYI with a corrupt + unclosed one created by doing:
32
--echo # 'create table t1 (a int key(a)) partition by hash (a) partitions 3'
33
--echo # head -c1024 t1#P#p1.MYI > corrupt_t1#P#p1.MYI
34
--remove_file $MYSQLD_DATADIR/test/t1_will_crash#P#p1.MYI
35
--copy_file std_data/corrupt_t1#P#p1.MYI $MYSQLD_DATADIR/test/t1_will_crash#P#p1.MYI
36
SELECT * FROM t1_will_crash;
37
DROP TABLE t1_will_crash;