summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r/rpl_xa_gap_lock.result
blob: cb760abe2d2ec136179f432c4f37e355065153c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
include/master-slave.inc
[connection master]
connection slave;
SET @saved_innodb_limit_optimistic_insert_debug = @@GLOBAL.innodb_limit_optimistic_insert_debug;
SET @@GLOBAL.innodb_limit_optimistic_insert_debug = 2;
connection master;
CREATE TABLE t1 (
c1 INT NOT NULL,
KEY(c1)
) ENGINE=InnoDB;
CREATE TABLE t2 (
c1 INT NOT NULL,
FOREIGN KEY(c1) REFERENCES t1(c1)
) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1), (3), (4);
connection master1;
XA START 'XA1';
INSERT INTO t1 values(2);
XA END 'XA1';
connection master;
XA START 'XA2';
INSERT INTO t2 values(3);
XA END 'XA2';
XA PREPARE 'XA2';
connection master1;
XA PREPARE 'XA1';
XA COMMIT 'XA1';
connection master;
XA COMMIT 'XA2';
include/sync_slave_sql_with_master.inc
include/stop_slave.inc
DROP TABLE t2, t1;
RESET SLAVE;
RESET MASTER;
connection master;
Restore binary log from the master into the slave
include/diff_tables.inc [master:test.t1, slave:test.t1]
include/diff_tables.inc [master:test.t2, slave:test.t2]
DROP TABLE t2, t1;
connection slave;
CHANGE MASTER TO MASTER_LOG_FILE='LOG_FILE', MASTER_LOG_POS=LOG_POS;
SET @@GLOBAL.innodb_limit_optimistic_insert_debug = @saved_innodb_limit_optimistic_insert_debug;
include/start_slave.inc
include/rpl_end.inc