summaryrefslogtreecommitdiff
path: root/mysql-test/t/myisam.test
diff options
context:
space:
mode:
authorunknown <kaa@polly.(none)>2007-11-26 20:15:30 +0300
committerunknown <kaa@polly.(none)>2007-11-26 20:15:30 +0300
commite4ef37148d242610ed41624bae161bdf971e7f4f (patch)
tree598aba7472d441171bbd41565a24f2d863a0dcb7 /mysql-test/t/myisam.test
parent06ed00f70091105a0222d14021245e02aa82283f (diff)
parent2d850823bb3c2177e241f9369ffbb587f5316937 (diff)
downloadmariadb-git-e4ef37148d242610ed41624bae161bdf971e7f4f.tar.gz
Merge polly.(none):/home/kaa/src/opt/bug28837/my51-bug29131
into polly.(none):/home/kaa/src/opt/mysql-5.1-opt storage/myisam/ha_myisam.cc: Auto merged mysql-test/r/merge.result: Manual merge. mysql-test/r/myisam.result: Manual merge. mysql-test/t/merge.test: Manual merge. mysql-test/t/myisam.test: Manual merge.
Diffstat (limited to 'mysql-test/t/myisam.test')
-rw-r--r--mysql-test/t/myisam.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 6f24d84f4c0..34db38d4a38 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -1172,6 +1172,23 @@ SHOW TABLE STATUS LIKE 't1';
#--exec myisamchk -iev var/master-data/test/t1.MYI
DROP TABLE t1;
+#
+# Bug#28837: MyISAM storage engine error (134) doing delete with self-join
+#
+
+CREATE TABLE t1 (id int NOT NULL, ref int NOT NULL, INDEX (id)) ENGINE=MyISAM;
+CREATE TABLE t2 LIKE t1;
+
+INSERT INTO t2 (id, ref) VALUES (1,3), (2,1), (3,2), (4,5), (4,4);
+INSERT INTO t1 SELECT * FROM t2;
+
+SELECT * FROM t1 AS a INNER JOIN t1 AS b USING (id) WHERE a.ref < b.ref;
+SELECT * FROM t1;
+DELETE FROM a USING t1 AS a INNER JOIN t1 AS b USING (id) WHERE a.ref < b.ref;
+SELECT * FROM t1;
+
+DROP TABLE t1, t2;
+
--echo End of 5.0 tests