summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/r/rpl_temporary_error2.result
blob: 7d60d467ec77c5eacf5850602a9bbf857b0ac370 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
include/master-slave.inc
[connection master]
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
*** Provoke a deadlock on the slave, check that transaction retry succeeds. ***
connection master;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
INSERT INTO t1(a) VALUES (1), (2), (3), (4), (5);
connection slave;
SELECT * FROM t1 ORDER BY a;
a	b
1	NULL
2	NULL
3	NULL
4	NULL
5	NULL
SET sql_log_bin=0;
ALTER TABLE t2 ENGINE=MyISAM;
SET sql_log_bin=1;
connect  con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
connection con_temp1;
BEGIN;
UPDATE t1 SET b=2 WHERE a=4;
INSERT INTO t2 VALUES (2);
DELETE FROM t2 WHERE a=2;
connection master;
BEGIN;
UPDATE t1 SET b=1 WHERE a=2;
INSERT INTO t2 VALUES (1);
UPDATE t1 SET b=1 WHERE a=4;
COMMIT;
connection slave;
connection con_temp1;
UPDATE t1 SET b=2 WHERE a=2;
SELECT * FROM t1 WHERE a<10 ORDER BY a;
a	b
1	NULL
2	2
3	NULL
4	2
5	NULL
ROLLBACK;
Warnings:
Warning	1196	Some non-transactional changed tables couldn't be rolled back
connection slave;
SELECT * FROM t1 ORDER BY a;
a	b
1	NULL
2	1
3	NULL
4	1
5	NULL
* There will be two rows in t2 due to the retry.
SELECT * FROM t2 ORDER BY a;
a
1
1
retries
1
Last_SQL_Errno = '0'
Last_SQL_Error = ''
connection master;
DROP TABLE t1;
DROP TABLE t2;
include/rpl_end.inc