summaryrefslogtreecommitdiff
path: root/mysql-test/r/binlog_tx_isolation.result
blob: 39aba22758dbd11676f0ac73b861034870d137db (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
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB;
INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
SET BINLOG_FORMAT=STATEMENT;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
ERROR HY000: Transaction isolation level 'READ-COMMITTED' is not safe for 'STATEMENT' binlog mode
UPDATE t1 SET b = a*a WHERE a > 1;
COMMIT;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
UPDATE t1 SET b = a*a WHERE a > 1;
COMMIT;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
UPDATE t1 SET b = a*a WHERE a > 1;
COMMIT;
SET BINLOG_FORMAT=MIXED;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
ERROR HY000: Transaction isolation level 'READ-COMMITTED' is not safe for 'MIXED' binlog mode
UPDATE t1 SET b = a*a*a WHERE a > 2;
COMMIT;
SET BINLOG_FORMAT=ROW;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
UPDATE t1 SET b = a*a*a*a WHERE a > 3;
COMMIT;
SELECT @@session.tx_isolation, @@session.binlog_format;
@@session.tx_isolation	READ-COMMITTED
@@session.binlog_format	ROW
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET BINLOG_FORMAT=MIXED;
ERROR HY000: Transaction isolation level 'READ-COMMITTED' prevents leaving 'ROW' binlog mode
UPDATE t1 SET b = a*a*a*a WHERE a > 3;
COMMIT;
SELECT @@session.tx_isolation, @@session.binlog_format;
@@session.tx_isolation	READ-COMMITTED
@@session.binlog_format	ROW
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET BINLOG_FORMAT=STATEMENT;
ERROR HY000: Transaction isolation level 'READ-COMMITTED' prevents leaving 'ROW' binlog mode
UPDATE t1 SET b = a*a*a*a WHERE a > 3;
COMMIT;
SELECT @@session.tx_isolation, @@session.binlog_format;
@@session.tx_isolation	READ-COMMITTED
@@session.binlog_format	ROW