summaryrefslogtreecommitdiff
path: root/mysql-test/t/merge.test
diff options
context:
space:
mode:
authorgluh@eagle.(none) <>2007-12-13 15:56:04 +0400
committergluh@eagle.(none) <>2007-12-13 15:56:04 +0400
commit4f5868114a1fe46f139f80d894dd28f1f7c180c1 (patch)
treee37ba43ba6ed4171e2b64ad9dbba79328c95a875 /mysql-test/t/merge.test
parent8506efa91e2bccbd312411a949960ec8736a363f (diff)
parentd3889cac7ca8a2188abfd2bcdbe928cee9fd893b (diff)
downloadmariadb-git-4f5868114a1fe46f139f80d894dd28f1f7c180c1.tar.gz
Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
Diffstat (limited to 'mysql-test/t/merge.test')
-rw-r--r--mysql-test/t/merge.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index 090d1cbf244..e49297dd06c 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -578,6 +578,28 @@ CREATE TABLE t2 (c1 INT) ENGINE=MERGE UNION=(t1) INSERT_METHOD=FIRST;
CREATE TABLE IF NOT EXISTS t1 SELECT * FROM t2;
DROP TABLE t1, t2;
+#
+# 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;
+INSERT INTO t1 SELECT * FROM t2;
+
+CREATE TABLE t3 (id INT NOT NULL, ref INT NOT NULL, INDEX (id)) ENGINE=MERGE
+ UNION(t1);
+
+SELECT * FROM t3 AS a INNER JOIN t3 AS b USING (id) WHERE a.ref < b.ref;
+SELECT * FROM t3;
+DELETE FROM a USING t3 AS a INNER JOIN t3 AS b USING (id) WHERE a.ref < b.ref;
+SELECT * FROM t3;
+
+DROP TABLE t1, t2, t3;
+
+
--echo End of 5.0 tests
#