mariadb/mysql-test/suite/innodb/t/xa_recovery.test
Sergei Golubchik d6d994bf42 remove two redundant *.inc files to restart a server
namely, restart_mysqld_with_option.inc and kill_and_restart_mysqld.inc -
use restart_mysqld.inc instead.

Also remove innodb_wl6501_crash_stripped.inc that wasn't used anywhere.
2017-03-31 19:28:58 +02:00

41 lines
1.1 KiB
Text

--source include/have_innodb.inc
# Embedded server does not support restarting.
--source include/not_embedded.inc
# MDEV-8841 - close tables opened by previous tests,
# so they don't get marked crashed when the server gets crashed
--disable_query_log
call mtr.add_suppression("Found 1 prepared XA transactions");
FLUSH TABLES;
--enable_query_log
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connect (con1,localhost,root);
XA START 'x'; UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x';
connection default;
--let $shutdown_timeout=0
--source include/restart_mysqld.inc
disconnect con1;
connect (con1,localhost,root);
--send SELECT * FROM t1 LOCK IN SHARE MODE
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
where state = 'Sending data' and
info = 'SELECT * FROM t1 LOCK IN SHARE MODE';
--source include/wait_condition.inc
--source include/restart_mysqld.inc
disconnect con1;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t1;
XA ROLLBACK 'x';
SELECT * FROM t1;
DROP TABLE t1;