2
--echo # BUG#41330 - Myisam table open count set to zero before index blocks are written.
4
--source include/not_embedded.inc
5
--echo # Don't test this under valgrind, memory leaks will occur
6
--source include/not_valgrind.inc
8
--echo # Binary must be compiled with debug for crash to occur
9
--source include/have_debug.inc
11
let $MYSQLD_DATADIR= `select @@datadir`;
12
SET GLOBAL delay_key_write=ALL;
13
CREATE TABLE t1(a INT,
16
KEY(b)) ENGINE=MyISAM DELAY_KEY_WRITE = 1;
17
INSERT INTO t1 VALUES (1,2),(2,3),(3,4),(4,5),(5,6);
19
--echo # Setup the mysqld to crash at certain point
20
SET SESSION debug="d,crash_before_flush_keys";
22
--echo # Write file to make mysql-test-run.pl expect crash
23
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
25
--echo # Run the crashing query
29
--echo # Write file to make mysql-test-run.pl start the server
30
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
32
--echo # Turn on reconnect
35
--echo # Call script that will poll the server waiting for
36
--echo # it to be back online again
37
--source include/wait_until_connected_again.inc
39
# Must report that the table wasn't closed properly