2020-01-13 20:07:04 +01:00
|
|
|
SET GLOBAL default_storage_engine = MyISAM;
|
|
|
|
SET SESSION default_storage_engine = MyISAM;
|
2010-07-02 17:21:07 +02:00
|
|
|
DROP TABLE IF EXISTS t1, t2, m1, m2;
|
|
|
|
CREATE TABLE t1 (c1 INT);
|
|
|
|
CREATE TABLE t2 (c1 INT);
|
|
|
|
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
CREATE TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
|
|
INSERT INTO t2 VALUES (2), (3), (4);
|
|
|
|
INSERT INTO m2 SELECT * FROM m1;
|
|
|
|
SELECT * FROM m2;
|
|
|
|
c1
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
SELECT * FROM t2;
|
|
|
|
c1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
DROP TABLE m2, m1, t2, t1;
|
|
|
|
CREATE TABLE t1 (c1 INT);
|
|
|
|
CREATE TABLE t2 (c1 INT);
|
2010-07-02 18:07:57 +02:00
|
|
|
CREATE TEMPORARY TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
CREATE TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
|
|
INSERT INTO t2 VALUES (2), (3), (4);
|
|
|
|
INSERT INTO m2 SELECT * FROM m1;
|
|
|
|
SELECT * FROM m2;
|
|
|
|
c1
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
DROP TABLE m2, m1, t2, t1;
|
|
|
|
CREATE TABLE t1 (c1 INT);
|
|
|
|
CREATE TABLE t2 (c1 INT);
|
|
|
|
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
CREATE TEMPORARY TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
|
|
INSERT INTO t2 VALUES (2), (3), (4);
|
|
|
|
INSERT INTO m2 SELECT * FROM m1;
|
|
|
|
SELECT * FROM m2;
|
|
|
|
c1
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
DROP TABLE m2, m1, t2, t1;
|
|
|
|
CREATE TABLE t1 (c1 INT);
|
|
|
|
CREATE TABLE t2 (c1 INT);
|
|
|
|
CREATE TEMPORARY TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
CREATE TEMPORARY TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
|
|
INSERT INTO t2 VALUES (2), (3), (4);
|
|
|
|
INSERT INTO m2 SELECT * FROM m1;
|
|
|
|
SELECT * FROM m2;
|
|
|
|
c1
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
DROP TABLE m2, m1, t2, t1;
|
|
|
|
CREATE TABLE t1 (c1 INT);
|
|
|
|
CREATE TABLE t2 (c1 INT);
|
2010-07-02 17:21:07 +02:00
|
|
|
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
CREATE TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
LOCK TABLE m1 WRITE, m2 WRITE;
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
|
|
INSERT INTO t2 VALUES (2), (3), (4);
|
|
|
|
INSERT INTO m2 SELECT * FROM m1;
|
|
|
|
SELECT * FROM m2;
|
|
|
|
c1
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
SELECT * FROM t2;
|
|
|
|
c1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
UNLOCK TABLES;
|
|
|
|
DROP TABLE m2, m1, t2, t1;
|
2010-07-02 18:07:57 +02:00
|
|
|
CREATE TABLE t1 (c1 INT);
|
|
|
|
CREATE TABLE t2 (c1 INT);
|
|
|
|
CREATE TEMPORARY TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
CREATE TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
LOCK TABLE m1 WRITE, m2 WRITE;
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
|
|
INSERT INTO t2 VALUES (2), (3), (4);
|
|
|
|
INSERT INTO m2 SELECT * FROM m1;
|
|
|
|
SELECT * FROM m2;
|
|
|
|
c1
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
UNLOCK TABLES;
|
|
|
|
DROP TABLE m2, m1, t2, t1;
|
|
|
|
CREATE TABLE t1 (c1 INT);
|
|
|
|
CREATE TABLE t2 (c1 INT);
|
|
|
|
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
CREATE TEMPORARY TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
LOCK TABLE m1 WRITE, m2 WRITE;
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
|
|
INSERT INTO t2 VALUES (2), (3), (4);
|
|
|
|
INSERT INTO m2 SELECT * FROM m1;
|
|
|
|
SELECT * FROM m2;
|
|
|
|
c1
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
UNLOCK TABLES;
|
|
|
|
DROP TABLE m2, m1, t2, t1;
|
|
|
|
CREATE TABLE t1 (c1 INT);
|
|
|
|
CREATE TABLE t2 (c1 INT);
|
|
|
|
CREATE TEMPORARY TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
CREATE TEMPORARY TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
|
|
|
INSERT_METHOD=LAST;
|
|
|
|
LOCK TABLE m1 WRITE, m2 WRITE;
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
|
|
INSERT INTO t2 VALUES (2), (3), (4);
|
|
|
|
INSERT INTO m2 SELECT * FROM m1;
|
|
|
|
SELECT * FROM m2;
|
|
|
|
c1
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
UNLOCK TABLES;
|
|
|
|
DROP TABLE m2, m1, t2, t1;
|
2010-07-02 17:21:07 +02:00
|
|
|
End of 6.0 tests
|