mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug fix for multi-table delete with test case and manual entry
This commit is contained in:
@ -66,3 +66,7 @@ select count(*) from t3 where id3;
|
||||
count(*)
|
||||
0
|
||||
drop table t1,t2,t3;
|
||||
create table t1(id1 int not null auto_increment primary key, t varchar(100));
|
||||
create table t2(id2 int not null, t varchar(100), index(id2));
|
||||
delete t1, t2 from t2,t1 where t1.id1 = t2.id2 and t1.id1 > 100;
|
||||
drop table t1,t2;
|
||||
|
@ -62,3 +62,21 @@ select count(*) from t2 where id2;
|
||||
select count(*) from t3 where id3;
|
||||
|
||||
drop table t1,t2,t3;
|
||||
create table t1(id1 int not null auto_increment primary key, t varchar(100));
|
||||
create table t2(id2 int not null, t varchar(100), index(id2));
|
||||
disable_query_log;
|
||||
let $1 = 1000;
|
||||
while ($1)
|
||||
{
|
||||
let $2 = 5;
|
||||
eval insert into t1(t) values ('aaaaaaaaaaaaaaaaaaaa');
|
||||
while ($2)
|
||||
{
|
||||
eval insert into t2(id2,t) values ($1,'bbbbbbbbbbbbbbbbb');
|
||||
dec $2;
|
||||
}
|
||||
dec $1;
|
||||
}
|
||||
enable_query_log;
|
||||
delete t1, t2 from t2,t1 where t1.id1 = t2.id2 and t1.id1 > 100;
|
||||
drop table t1,t2;
|
||||
|
Reference in New Issue
Block a user