1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Merge polly.(none):/home/kaa/src/opt/bug28837/my50-bug29131

into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
This commit is contained in:
kaa@polly.(none)
2007-11-26 19:35:08 +03:00
6 changed files with 110 additions and 4 deletions

View File

@@ -1187,4 +1187,21 @@ 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