summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorRohit Kalhans <rohit.kalhans@oracle.com>2012-02-13 14:12:13 +0530
committerRohit Kalhans <rohit.kalhans@oracle.com>2012-02-13 14:12:13 +0530
commitb836b02fc9c8702dc61bad29d52ac922055fcd19 (patch)
treec5b46497162b08b55e6eddddd305bf636a1b9685 /mysql-test/r
parent53e5e4255a8baff031b7960627bd28ded66eecaf (diff)
downloadmariadb-git-b836b02fc9c8702dc61bad29d52ac922055fcd19.tar.gz
BUG#11758263: Modification of indentation in the added code.
Fixed a typo in the comment. Fixing test cases which were previouslyno throwing due disable warnings macro.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/multi_update.result11
1 files changed, 9 insertions, 2 deletions
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index c6ee170eef7..9b66ddb37b4 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -1,3 +1,4 @@
+CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
drop table if exists t1,t2,t3;
drop database if exists mysqltest;
drop view if exists v1;
@@ -125,6 +126,8 @@ ID ParId tst tst1
2 2 NULL NULL
3 3 NULL NULL
UPDATE t2, t1 SET t2.tst = t1.tst, t2.tst1 = t1.tst1 WHERE t2.ParId = t1.Id;
+Warnings:
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.
select * from t2;
ID ParId tst tst1
1 1 MySQL MySQL AB
@@ -349,6 +352,8 @@ drop table t1,t2;
create table t1 (a int not null auto_increment primary key, b int not null);
insert into t1 (b) values (1),(2),(3),(4);
update t1, t1 as t2 set t1.b=t2.b+1 where t1.a=t2.a;
+Warnings:
+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.
select * from t1;
a b
1 2
@@ -605,7 +610,8 @@ a b
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; UPDATE t2,t1 SET t2.a=t1.a+2
+master-bin.000001 # Table_map # # table_id: # (test.t2)
+master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
delete from t1;
delete from t2;
@@ -617,7 +623,8 @@ ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a
+master-bin.000001 # Table_map # # table_id: # (test.t2)
+master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
drop table t1, t2;
set @@session.binlog_format= @sav_binlog_format;