~ubuntu-branches/ubuntu/wily/mysql-5.6/wily

« back to all changes in this revision

Viewing changes to mysql-test/suite/innodb/t/xa_recovery.test

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-07-21 07:09:29 UTC
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20150721070929-mg4dpqkgg3it1ajf
Tags: upstream-5.6.25
ImportĀ upstreamĀ versionĀ 5.6.25

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--source include/have_innodb.inc
 
2
# Embedded server does not support restarting.
 
3
--source include/not_embedded.inc
 
4
 
 
5
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
 
6
INSERT INTO t1 VALUES (1);
 
7
connect (con1,localhost,root);
 
8
XA START 'x'; UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x';
 
9
connection default;
 
10
 
 
11
call mtr.add_suppression("Found 1 prepared XA transactions");
 
12
 
 
13
# Kill and restart the server.
 
14
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
 
15
-- shutdown_server 0
 
16
-- source include/wait_until_disconnected.inc
 
17
 
 
18
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
 
19
-- enable_reconnect
 
20
-- source include/wait_until_connected_again.inc
 
21
-- disable_reconnect
 
22
 
 
23
disconnect con1;
 
24
connect (con1,localhost,root);
 
25
--send SELECT * FROM t1 LOCK IN SHARE MODE
 
26
 
 
27
connection default;
 
28
let $wait_condition=
 
29
  select count(*) = 1 from information_schema.processlist
 
30
  where state = 'Sending data' and
 
31
        info = 'SELECT * FROM t1 LOCK IN SHARE MODE';
 
32
--source include/wait_condition.inc
 
33
 
 
34
--source include/restart_mysqld.inc
 
35
 
 
36
disconnect con1;
 
37
 
 
38
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
 
39
SELECT * FROM t1;
 
40
XA ROLLBACK 'x';
 
41
SELECT * FROM t1;
 
42
 
 
43
DROP TABLE t1;