--source include/have_debug.inc
# Valgrind does not work well with test that crashes the server
--source include/not_valgrind.inc
install soname 'ha_spider';
CREATE TABLE t1 (a INT) ENGINE=Innodb;

# crash the server.
--let $expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
--let $expect_file_name= $MYSQLTEST_VARDIR/tmp/$expect_file_name.expect
--exec echo wait > $expect_file_name
SET SESSION debug_dbug="+d,crash_commit_after_log";
--error 2006,2013,2026
INSERT INTO t1 VALUES (1);

# restart the server
--exec echo restart >> $expect_file_name
--enable_reconnect
--source include/wait_until_connected_again.inc

drop table t1;
--disable_query_log
--source ../../include/clean_up_spider.inc
