~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/r/sp_trans_log.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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() 
 
7
RETURNS int(11)
 
8
DETERMINISTIC
 
9
begin
 
10
insert into t1 values (null);
 
11
select count(*) from t1 into @a;
 
12
return @a;
 
13
end|
 
14
reset master|
 
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 */|
 
25
count(*)        @a
 
26
1       1
 
27
drop table t1,t2;
 
28
drop function if exists bug23333;