1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

BUG#34768 - nondeterministic INSERT using LIMIT logged in stmt mode

if binlog_format=mixed

Addition to fix for BUG#34768: fixed test case failures discovered
by pushbuild.
This commit is contained in:
svoj@mysql.com/june.mysql.com
2008-03-25 17:28:12 +04:00
parent 3bb915ea32
commit b799ea244c
4 changed files with 8 additions and 3 deletions

View File

@@ -10,12 +10,13 @@ execute s using @a;
prepare s from "insert into t1 select 100 limit ?"; prepare s from "insert into t1 select 100 limit ?";
set @a=100; set @a=100;
execute s using @a; execute s using @a;
Warnings:
Warning 1592 Statement is not safe to log in statement format.
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; create table t1 (a int) master-bin.000001 # Query # # use `test`; create table t1 (a int)
master-bin.000001 # User var # # @`a`=98 master-bin.000001 # User var # # @`a`=98
master-bin.000001 # Query # # use `test`; insert into t1 values (@a),(98) master-bin.000001 # Query # # use `test`; insert into t1 values (@a),(98)
master-bin.000001 # Query # # use `test`; insert into t1 values (99) master-bin.000001 # Query # # use `test`; insert into t1 values (99)
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Query # # use `test`; insert into t1 select 100 limit 100
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
drop table t1; drop table t1;

View File

@@ -1,7 +1,7 @@
# This test is to verify replication with PS # This test is to verify replication with PS
-- source include/not_embedded.inc -- source include/not_embedded.inc
-- source include/have_binlog_format_mixed_or_statement.inc -- source include/have_binlog_format_statement.inc
-- disable_query_log -- disable_query_log
reset master; # get rid of previous tests binlog reset master; # get rid of previous tests binlog

View File

@@ -31,7 +31,9 @@ INSERT INTO t1 (a) SELECT null FROM t1;
save_master_pos; save_master_pos;
# a few updates to force OPTIMIZE to do something # a few updates to force OPTIMIZE to do something
update t1 set b=(a/2*rand()); update t1 set b=(a/2*rand());
--disable_warnings
delete from t1 order by b limit 10000; delete from t1 order by b limit 10000;
--enable_warnings
connection slave; connection slave;
sync_with_master; sync_with_master;

View File

@@ -315,7 +315,9 @@ create table t1(a int);
insert into t1 values (1),(2); insert into t1 values (1),(2);
prepare s1 from 'insert into t1 select a from t1 limit ?'; prepare s1 from 'insert into t1 select a from t1 limit ?';
set @x='1.1'; set @x='1.1';
--disable_warnings
execute s1 using @x; execute s1 using @x;
--enable_warnings
select * from t1; select * from t1;
sync_slave_with_master; sync_slave_with_master;
connection slave; connection slave;