1
drop function if exists bug23333|
2
drop table if exists t1,t2|
3
CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
4
CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
5
insert into t2 values (1,1)|
6
create function bug23333()
10
insert into t1 values (null);
11
select count(*) from t1 into @a;
15
insert into t2 values (bug23333(),1)|
16
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
17
show binlog events from 106 /* with fixes for #23333 will show there is the query */|
18
Log_name Pos Event_type Server_id End_log_pos Info
19
master-bin.000001 # Query 1 # #
20
master-bin.000001 # Table_map 1 # #
21
master-bin.000001 # Table_map 1 # #
22
master-bin.000001 # Write_rows 1 # #
23
master-bin.000001 # Query 1 # #
24
select count(*),@a from t1 /* must be 1,1 */|
28
drop function if exists bug23333;