From dc3f3ce69430ed1608c0134da7a7e95f527c3d7c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Oct 2004 16:23:54 +0500 Subject: delete.result, delete.test: A fix (bug #5733: Table handler error with self-join multi-table DELETE). records.cc: A fix (bug #5733: Table handler error with self-join multi-table DELETE). sql/records.cc: ]A fix (bug #5733: Table handler error with self-join multi-table DELETE). mysql-test/t/delete.test: A fix (bug #5733: Table handler error with self-join multi-table DELETE). mysql-test/r/delete.result: A fix (bug #5733: Table handler error with self-join multi-table DELETE). --- mysql-test/r/delete.result | 11 +++++++++++ mysql-test/t/delete.test | 10 ++++++++++ 2 files changed, 21 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index abc8245e69f..7353e687ae7 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -50,3 +50,14 @@ select count(*) from t1; count(*) 0 drop table t1; +create table t1 (a int not null auto_increment primary key, b char(32)); +insert into t1 (b) values ('apple'), ('apple'); +select * from t1; +a b +1 apple +2 apple +delete t1 from t1, t1 as t2 where t1.b = t2.b and t1.a > t2.a; +select * from t1; +a b +1 apple +drop table t1; diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index 904d959d148..07cb9155b3f 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -61,3 +61,13 @@ select count(*) from t1; drop table t1; +# +# Bug #5733: Table handler error with self-join multi-table DELETE +# + +create table t1 (a int not null auto_increment primary key, b char(32)); +insert into t1 (b) values ('apple'), ('apple'); +select * from t1; +delete t1 from t1, t1 as t2 where t1.b = t2.b and t1.a > t2.a; +select * from t1; +drop table t1; -- cgit v1.2.1