mirror of
https://github.com/MariaDB/server.git
synced 2025-02-06 22:02:20 +01:00
![Monty](/assets/img/avatar_default.png)
This makes it easier to run test on just the MRG_MYISAM engine. Other things: - Renamed merge-big.test to flush_corruption.test as it does not have anything to do with merge tables.
70 lines
2.6 KiB
Text
70 lines
2.6 KiB
Text
DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
|
|
CREATE TABLE t1 (c1 varchar(100)) ENGINE=MyISAM;
|
|
CREATE TABLE t2 (c1 varchar(100)) ENGINE=MyISAM;
|
|
CREATE TABLE t3 (c1 varchar(100)) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES ('Ann'), ('Alice');
|
|
INSERT INTO t2 VALUES ('Bob'), ('Brian');
|
|
INSERT INTO t3 VALUES ('Chris'), ('Charlie');
|
|
CREATE TABLE t4 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t2)
|
|
INSERT_METHOD=LAST;
|
|
CREATE TABLE t5 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t3)
|
|
INSERT_METHOD=LAST;
|
|
SELECT * FROM t5;
|
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
|
SELECT * FROM t4;
|
|
c1
|
|
Ann
|
|
Alice
|
|
Bob
|
|
Brian
|
|
ALTER TABLE t2 ENGINE=InnoDB;
|
|
SELECT * FROM t4;
|
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
|
DELETE FROM t2 LIMIT 1;
|
|
SELECT * FROM t4;
|
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
|
INSERT INTO t4 VALUES ('Beware');
|
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
|
SELECT * FROM t4;
|
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
|
SELECT * FROM t2;
|
|
c1
|
|
Brian
|
|
SELECT * FROM t1;
|
|
c1
|
|
Ann
|
|
Alice
|
|
DROP TABLE t1, t2, t3, t4, t5;
|
|
create table t1 (c1 varchar(100));
|
|
create table t2 (c1 varchar(100));
|
|
create view t3 as select * from t1;
|
|
insert into t1 values ('ann'), ('alice');
|
|
insert into t2 values ('bob'), ('brian');
|
|
create temporary table t4 (c1 varchar(100)) engine=MERGE union=(t2, t1);
|
|
create temporary table t5 (c1 varchar(100)) engine=MERGE union=(t3, t1);
|
|
select * from t5;
|
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
|
lock tables t1 read, t2 read, t3 read, t4 read;
|
|
select * from t5;
|
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
|
select * from t4;
|
|
c1
|
|
bob
|
|
brian
|
|
ann
|
|
alice
|
|
unlock tables;
|
|
drop table t2;
|
|
create view t2 as select * from t1;
|
|
select * from t4;
|
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
|
lock tables t1 read, t2 read, t3 read;
|
|
select * from t4;
|
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
|
select * from t4;
|
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
|
select * from t4;
|
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
|
unlock tables;
|
|
drop view t2, t3;
|
|
drop table t1;
|