mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-marvel
into andrepl.(none):/home/elkin/MySQL/MAIN/5.0-marvel-bug23333_sf_side_eff_binlog
This commit is contained in:
@ -530,3 +530,35 @@ count(*)
|
||||
drop table t3, t4|
|
||||
drop procedure bug14210|
|
||||
set @@session.max_heap_table_size=default|
|
||||
drop function if exists bug23333|
|
||||
drop table if exists t1,t2|
|
||||
CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
|
||||
CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
|
||||
reset master|
|
||||
insert into t2 values (1,1)|
|
||||
create function bug23333()
|
||||
RETURNS int(11)
|
||||
DETERMINISTIC
|
||||
begin
|
||||
insert into t1 values (null);
|
||||
select count(*) from t1 into @a;
|
||||
return @a;
|
||||
end|
|
||||
insert into t2 values (bug23333(),1)|
|
||||
ERROR 23000: Duplicate entry '1' for key 1
|
||||
show binlog events /* must show the insert */|
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 98 Server ver: 5.0.40-debug-log, Binlog ver: 4
|
||||
master-bin.000001 98 Query 1 90 use `test`; insert into t2 values (1,1)
|
||||
master-bin.000001 188 Xid 1 215 COMMIT /* xid=1165 */
|
||||
master-bin.000001 215 Query 1 446 use `test`; CREATE DEFINER=`root`@`localhost` function bug23333()
|
||||
RETURNS int(11)
|
||||
DETERMINISTIC
|
||||
begin
|
||||
insert into t1 values (null);
|
||||
select count(*) from t1 into @a;
|
||||
return @a;
|
||||
end
|
||||
select count(*),@a from t1 /* must be 1,1 */|
|
||||
count(*) @a
|
||||
1 1
|
||||
|
@ -553,6 +553,36 @@ drop procedure bug14210|
|
||||
set @@session.max_heap_table_size=default|
|
||||
|
||||
|
||||
#
|
||||
# Bug #13270 INSERT,UPDATE,etc that calls func with side-effect does not binlog
|
||||
# Bug #23333 stored function + non-transac table + transac table =
|
||||
# breaks stmt-based binlog
|
||||
# Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
|
||||
#
|
||||
--disable_warnings
|
||||
drop function if exists bug23333|
|
||||
drop table if exists t1,t2|
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
|
||||
CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
|
||||
|
||||
reset master|
|
||||
insert into t2 values (1,1)|
|
||||
|
||||
create function bug23333()
|
||||
RETURNS int(11)
|
||||
DETERMINISTIC
|
||||
begin
|
||||
insert into t1 values (null);
|
||||
select count(*) from t1 into @a;
|
||||
return @a;
|
||||
end|
|
||||
|
||||
--error ER_DUP_ENTRY
|
||||
insert into t2 values (bug23333(),1)|
|
||||
show binlog events /* must show the insert */|
|
||||
select count(*),@a from t1 /* must be 1,1 */|
|
||||
|
||||
#
|
||||
# BUG#NNNN: New bug synopsis
|
||||
#
|
||||
|
Reference in New Issue
Block a user