diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/multi_update.result | 6 | ||||
-rw-r--r-- | mysql-test/t/multi_update.test | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index fc414f2f46b..5e7b392b503 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -399,3 +399,9 @@ select * from t2; c2_id c2_p_id c2_note c2_active 1 1 A Note 1 drop table t1, t2; +drop table if exists t2, t1; +create table t1(aclid bigint not null primary key, status tinyint(1) not null ) type = innodb; +create table t2(refid bigint not null primary key, aclid bigint, index idx_acl(aclid) )type = innodb; +insert into t2 values(1,null); +delete t2, t1 from t2 as a left join t1 as b on (a.aclid=b.aclid) where a.refid='1'; +drop table t1, t2; diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index 3494126f890..2d6770f77ed 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -337,3 +337,12 @@ update t1 left join t2 on p_id = c2_p_id set c2_note = 'asdf-1' where p_id = 2; select * from t1; select * from t2; drop table t1, t2; + +# Test for BUG#5837 - delete with outer join and const tables +drop table if exists t2, t1; +create table t1(aclid bigint not null primary key, status tinyint(1) not null ) type = innodb; +create table t2(refid bigint not null primary key, aclid bigint, index idx_acl(aclid) )type = innodb; +insert into t2 values(1,null); +delete t2, t1 from t2 as a left join t1 as b on (a.aclid=b.aclid) where a.refid='1'; +drop table t1, t2; + |