bug#30337 DELETE ... WHERE PK IN (..) and AFTER DELETE trigger crashes API node: Added testcase

This commit is contained in:
mskold/marty@mysql.com/linux.site 2007-08-13 15:59:08 +02:00
parent 8dd40ef670
commit 06b3c9a8b8
2 changed files with 41 additions and 0 deletions

View file

@ -405,3 +405,22 @@ a b
1 1
10 10
drop table t2;
create table t1 (id int primary key) engine ndb;
insert into t1 values (1), (2), (3);
create table t2 (id int primary key) engine ndb;
insert into t2 select id from t1;
create trigger kaboom after delete on t1
for each row begin
delete from t2 where id=old.id;
end|
select * from t1 order by id;
id
1
2
3
delete from t1 where id in (1,2);
select * from t2 order by id;
id
3
drop trigger kaboom;
drop table t1;

View file

@ -291,3 +291,25 @@ insert into t2 values (1,1), (10,10);
select * from t2 use index (ab) where a in(1,10) order by a;
drop table t2;
#bug#30337
create table t1 (id int primary key) engine ndb;
insert into t1 values (1), (2), (3);
create table t2 (id int primary key) engine ndb;
insert into t2 select id from t1;
delimiter |;
create trigger kaboom after delete on t1
for each row begin
delete from t2 where id=old.id;
end|
delimiter ;|
select * from t1 order by id;
delete from t1 where id in (1,2);
select * from t2 order by id;
drop trigger kaboom;
drop table t1;