summaryrefslogtreecommitdiff
path: root/mysql-test/t/myisam.test
diff options
context:
space:
mode:
authorgluh@eagle.(none) <>2007-12-13 14:52:49 +0400
committergluh@eagle.(none) <>2007-12-13 14:52:49 +0400
commite03959502978f9a7056b4adf6ba7c2a25f648b14 (patch)
treeb870e5e7b713672711344eb2e5b585f3e2c48375 /mysql-test/t/myisam.test
parent9217f011361bf7c09f05692c409f52d553ce9690 (diff)
parent9f4f6acc53d1f9472def4a6f3fa650f6e72b1d6a (diff)
downloadmariadb-git-e03959502978f9a7056b4adf6ba7c2a25f648b14.tar.gz
Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
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 80c7a92c12f..90d4fc01afb 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -1193,4 +1193,21 @@ SET @@myisam_repair_threads=1;
CHECK TABLE t1 EXTENDED;
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