Debian Codegraph @

mysql-test/suite/binlog/r/binlog_stm_do_db.result

raw
1 RESET MASTER;
2 SET @old_isolation_level= @@session.transaction_isolation;
3 SET @@session.transaction_isolation= 'READ-COMMITTED';
4 CREATE DATABASE b42829;
5 use b42829;
6 CREATE TABLE t1 (x int, y int) engine=InnoDB;
7 CREATE TABLE t2 (x int, y int) engine=InnoDB;
8 CREATE DATABASE b42829_filtered;
9 use b42829_filtered;
10 CREATE TABLE t1 (x int, y int) engine=InnoDB;
11 CREATE TABLE t2 (x int, y int) engine=InnoDB;
12 SET @@session.sql_log_bin= 0;
13 INSERT INTO b42829_filtered.t1 VALUES (100,100);
14 INSERT INTO b42829.t1 VALUES (100,100);
15 SET @@session.sql_log_bin= 1;
16 ### assertion: the inserts will not raise log error because
17 ### binlog-do-db is filtering used database
18 INSERT INTO t2 VALUES (1,2), (1,3), (1,4);
19 INSERT INTO t1 SELECT * FROM t2;
20 ### assertion: assert that despite updating a not filtered
21 ### database this wont trigger an error as the
22 ### used database is the filtered one.
23 UPDATE b42829_filtered.t1 ft1, b42829.t1 nft1 SET ft1.x=1, nft1.x=2;
24 use b42829;
25 ### assertion: the statements *will* raise log error because
26 ### binlog-do-db is not filtering used database
27 BEGIN;
28 INSERT INTO t2 VALUES (1,2), (1,3), (1,4);
29 ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
30 UPDATE b42829_filtered.t1 ft1, b42829.t1 nft1 SET ft1.x=1, nft1.x=2;
31 ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
32 INSERT INTO t1 SELECT * FROM t2;
33 ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
34 COMMIT;
35 ### assertion: filtered events did not make into the binlog
36 include/show_binlog_events.inc
37 Log_name Pos Event_type Server_id End_log_pos Info
38 master-bin.000001 # Gtid # # GTID #-#-#
39 master-bin.000001 # Query # # CREATE DATABASE b42829
40 master-bin.000001 # Gtid # # GTID #-#-#
41 master-bin.000001 # Query # # use `b42829`; CREATE TABLE t1 (x int, y int) engine=InnoDB
42 master-bin.000001 # Gtid # # GTID #-#-#
43 master-bin.000001 # Query # # use `b42829`; CREATE TABLE t2 (x int, y int) engine=InnoDB
44 DROP DATABASE b42829;
45 DROP DATABASE b42829_filtered;
46 SET @@session.transaction_isolation= @old_isolation_level;