diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2002-06-04 20:34:13 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2002-06-04 20:34:13 +0300 |
commit | 17d056666a6e2a4ab3d0f6358021bf1cfba1421f (patch) | |
tree | 782cfe816b8c67cc282862e5a22514dcd76f63da /mysql-test | |
parent | 838a3af962eb1535f5d51c5b2c91559b63ae0e6e (diff) | |
download | mariadb-git-17d056666a6e2a4ab3d0f6358021bf1cfba1421f.tar.gz |
Bug fix for multi-table delete with test case and manual entry
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/multi_update.result | 4 | ||||
-rw-r--r-- | mysql-test/t/multi_update.test | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 85819d9571d..b31677069af 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -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; diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index c16189168d2..0c906e56230 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -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; |