mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Merge polly.(none):/home/kaa/src/opt/bug28837/my50-bug29131
into polly.(none):/home/kaa/src/opt/bug28837/my51-bug29131 mysql-test/r/merge.result: Auto merged mysql-test/t/merge.test: Auto merged mysql-test/r/myisam.result: Manual merge. mysql-test/t/myisam.test: Manual merge. storage/myisam/ha_myisam.cc: Manual merge. storage/myisammrg/ha_myisammrg.cc: Manual merge.
This commit is contained in:
commit
ed48025916
6 changed files with 108 additions and 2 deletions
|
|
@ -879,4 +879,41 @@ CHECK TABLE tm1;
|
|||
Table Op Msg_type Msg_text
|
||||
test.tm1 check status OK
|
||||
DROP TABLE tm1, 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue