diff options
author | unknown <kaa@polly.(none)> | 2007-11-26 19:35:08 +0300 |
---|---|---|
committer | unknown <kaa@polly.(none)> | 2007-11-26 19:35:08 +0300 |
commit | 29cdc47ecd3db062f2bf4dc88130da2a0299f6da (patch) | |
tree | db2bf05dc2df612f215e2abd4533d981a47c91b5 /mysql-test/r | |
parent | c81eb57b92ad6ec1409e7e34c672ca983fdd7bc6 (diff) | |
parent | 67bf39f241bb1742dfa221218ff3d50842f58490 (diff) | |
download | mariadb-git-29cdc47ecd3db062f2bf4dc88130da2a0299f6da.tar.gz |
Merge polly.(none):/home/kaa/src/opt/bug28837/my50-bug29131
into polly.(none):/home/kaa/src/opt/mysql-5.0-opt
sql/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/r')
-rw-r--r-- | mysql-test/r/merge.result | 37 | ||||
-rw-r--r-- | mysql-test/r/myisam.result | 22 |
2 files changed, 59 insertions, 0 deletions
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 24a56fbf575..2ceae95dfca 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -881,4 +881,41 @@ CREATE TABLE t2 (c1 INT) ENGINE=MERGE UNION=(t1) INSERT_METHOD=FIRST; CREATE TABLE IF NOT EXISTS t1 SELECT * FROM t2; ERROR HY000: You can't specify target table 't1' for update in FROM clause DROP TABLE t1, t2; +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; +id ref ref +4 4 5 +4 4 5 +4 4 5 +4 4 5 +SELECT * FROM t3; +id ref +1 3 +2 1 +3 2 +4 5 +4 4 +1 3 +2 1 +3 2 +4 5 +4 4 +DELETE FROM a USING t3 AS a INNER JOIN t3 AS b USING (id) WHERE a.ref < b.ref; +SELECT * FROM t3; +id ref +1 3 +2 1 +3 2 +4 5 +1 3 +2 1 +3 2 +4 5 +DROP TABLE t1, t2, t3; End of 5.0 tests diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 176d0e97012..c7d4effcc35 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1831,4 +1831,26 @@ SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment t1 MyISAM 10 Fixed 1 # # # 3072 # # # # # # # DROP TABLE t1; +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; +id ref ref +4 4 5 +SELECT * FROM t1; +id ref +1 3 +2 1 +3 2 +4 5 +4 4 +DELETE FROM a USING t1 AS a INNER JOIN t1 AS b USING (id) WHERE a.ref < b.ref; +SELECT * FROM t1; +id ref +1 3 +2 1 +3 2 +4 5 +DROP TABLE t1, t2; End of 5.0 tests |