diff options
Diffstat (limited to 'mysql-test/suite/binlog/r/binlog_stm_row.result')
-rw-r--r-- | mysql-test/suite/binlog/r/binlog_stm_row.result | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_stm_row.result b/mysql-test/suite/binlog/r/binlog_stm_row.result index 7fc1d1f447c..68df53a3c6e 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_row.result +++ b/mysql-test/suite/binlog/r/binlog_stm_row.result @@ -12,50 +12,54 @@ select @@SESSION.BINLOG_FORMAT; STATEMENT INSERT INTO t1 VALUES(1); INSERT INTO t2 VALUES(2); +connect con1,localhost,root,,; +connect con2,localhost,root,,; # # Ensure that INSERT INTO .. SELECT FROM under SBR takes a read # lock that will prevent the source table from being modified. # -# con1 +connection con1; SELECT GET_LOCK('Bug#34306', 120); GET_LOCK('Bug#34306', 120) 1 -# con2 +connection con2; PREPARE stmt FROM "INSERT INTO t1 SELECT * FROM t2 WHERE GET_LOCK('Bug#34306', 120)"; EXECUTE stmt;; -# default +connection default; INSERT INTO t2 VALUES (3);; -# con1 +connection con1; SELECT RELEASE_LOCK('Bug#34306'); RELEASE_LOCK('Bug#34306') 1 -# con2 +connection con2; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. SELECT RELEASE_LOCK('Bug#34306'); RELEASE_LOCK('Bug#34306') 1 -# default +connection default; # # Ensure that INSERT INTO .. SELECT FROM prepared under SBR does # not prevent the source table from being modified if under RBR. # -# con2 +connection con2; SET SESSION BINLOG_FORMAT = ROW; -# con1 +connection con1; SELECT GET_LOCK('Bug#34306', 120); GET_LOCK('Bug#34306', 120) 1 -# con2 +connection con2; EXECUTE stmt;; -# default -# con1 +connection default; +connection con1; INSERT INTO t2 VALUES (4); SELECT RELEASE_LOCK('Bug#34306'); RELEASE_LOCK('Bug#34306') 1 -# con2 -# default +connection con2; +disconnect con1; +disconnect con2; +connection default; # Show binlog events include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info |