Below is the list of changes that have just been committed into a local
5.0 repository of dlenev. When dlenev does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2166 06/04/19 19:13:03 dlenev@stripped +2 -0
Added test case for bug #16021 "Wrong index given to function in trigger"
which was caused by the same bulk insert optimization as bug #17764 but
had slightly different symptoms.
mysql-test/t/trigger.test
1.41 06/04/19 19:12:59 dlenev@stripped +25 -1
Added test case for bug #16021 "Wrong index given to function in trigger"
which was caused by the same bulk insert optimization as bug #17764 but
had slightly different symptoms.
mysql-test/r/trigger.result
1.36 06/04/19 19:12:59 dlenev@stripped +34 -1
Added test case for bug #16021 "Wrong index given to function in trigger"
which was caused by the same bulk insert optimization as bug #17764 but
had slightly different symptoms.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: dlenev
# Host: jabberwock.site
# Root: /home/dlenev/mysql-5.0-bg16021
--- 1.35/mysql-test/r/trigger.result 2006-04-12 19:30:50 +04:00
+++ 1.36/mysql-test/r/trigger.result 2006-04-19 19:12:59 +04:00
@@ -949,9 +949,42 @@
create function f2() returns int return (select max(b) from t2);
insert into t2 select a, f2() from t1;
load data infile '../std_data_ln/words.dat' into table t1 (a) set b:= f1();
-drop table t1;
+drop tables t1, t2;
drop function f1;
drop function f2;
+create table t1(i int not null, j int not null, n numeric(15,2), primary key(i,j));
+create table t2(i int not null, n numeric(15,2), primary key(i));
+create trigger t1_ai after insert on t1 for each row
+begin
+declare sn numeric(15,2);
+select sum(n) into sn from t1 where i=new.i;
+replace into t2 values(new.i, sn);
+end|
+insert into t1 values
+(1,1,10.00),(1,2,10.00),(1,3,10.00),(1,4,10.00),(1,5,10.00),
+(1,6,10.00),(1,7,10.00),(1,8,10.00),(1,9,10.00),(1,10,10.00),
+(1,11,10.00),(1,12,10.00),(1,13,10.00),(1,14,10.00),(1,15,10.00);
+select * from t1;
+i j n
+1 1 10.00
+1 2 10.00
+1 3 10.00
+1 4 10.00
+1 5 10.00
+1 6 10.00
+1 7 10.00
+1 8 10.00
+1 9 10.00
+1 10 10.00
+1 11 10.00
+1 12 10.00
+1 13 10.00
+1 14 10.00
+1 15 10.00
+select * from t2;
+i n
+1 150.00
+drop tables t1, t2;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
conn_id INT,
--- 1.40/mysql-test/t/trigger.test 2006-04-12 19:30:51 +04:00
+++ 1.41/mysql-test/t/trigger.test 2006-04-19 19:12:59 +04:00
@@ -1111,9 +1111,33 @@
create function f2() returns int return (select max(b) from t2);
insert into t2 select a, f2() from t1;
load data infile '../std_data_ln/words.dat' into table t1 (a) set b:= f1();
-drop table t1;
+drop tables t1, t2;
drop function f1;
drop function f2;
+
+#
+# Test for bug #16021 "Wrong index given to function in trigger" which
+# was caused by the same bulk insert optimization as bug #17764 but had
+# slightly different symptoms (instead of reporting table as crashed
+# storage engine reported error number 124)
+#
+create table t1(i int not null, j int not null, n numeric(15,2), primary key(i,j));
+create table t2(i int not null, n numeric(15,2), primary key(i));
+delimiter |;
+create trigger t1_ai after insert on t1 for each row
+begin
+ declare sn numeric(15,2);
+ select sum(n) into sn from t1 where i=new.i;
+ replace into t2 values(new.i, sn);
+end|
+delimiter ;|
+insert into t1 values
+ (1,1,10.00),(1,2,10.00),(1,3,10.00),(1,4,10.00),(1,5,10.00),
+ (1,6,10.00),(1,7,10.00),(1,8,10.00),(1,9,10.00),(1,10,10.00),
+ (1,11,10.00),(1,12,10.00),(1,13,10.00),(1,14,10.00),(1,15,10.00);
+select * from t1;
+select * from t2;
+drop tables t1, t2;
#
# Test for Bug #16461 connection_id() does not work properly inside trigger
| Thread |
|---|
| • bk commit into 5.0 tree (dlenev:1.2166) BUG#17764 | dlenev | 19 Apr |