| 1 |
DROP TABLE IF EXISTS t1, t2, t3, t4, t5; |
| 2 |
CREATE TABLE t1 (c1 varchar(100)) ENGINE=MyISAM; |
| 3 |
CREATE TABLE t2 (c1 varchar(100)) ENGINE=MyISAM; |
| 4 |
CREATE TABLE t3 (c1 varchar(100)) ENGINE=InnoDB; |
| 5 |
INSERT INTO t1 VALUES ('Ann'), ('Alice'); |
| 6 |
INSERT INTO t2 VALUES ('Bob'), ('Brian'); |
| 7 |
INSERT INTO t3 VALUES ('Chris'), ('Charlie'); |
| 8 |
CREATE TABLE t4 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t2) |
| 9 |
INSERT_METHOD=LAST; |
| 10 |
CREATE TABLE t5 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t3) |
| 11 |
INSERT_METHOD=LAST; |
| 12 |
SELECT * FROM t5; |
| 13 |
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| 14 |
SELECT * FROM t4; |
| 15 |
c1 |
| 16 |
Ann |
| 17 |
Alice |
| 18 |
Bob |
| 19 |
Brian |
| 20 |
ALTER TABLE t2 ENGINE=InnoDB; |
| 21 |
SELECT * FROM t4; |
| 22 |
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| 23 |
DELETE FROM t2 LIMIT 1; |
| 24 |
SELECT * FROM t4; |
| 25 |
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| 26 |
INSERT INTO t4 VALUES ('Beware'); |
| 27 |
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| 28 |
SELECT * FROM t4; |
| 29 |
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| 30 |
SELECT * FROM t2; |
| 31 |
c1 |
| 32 |
Brian |
| 33 |
SELECT * FROM t1; |
| 34 |
c1 |
| 35 |
Ann |
| 36 |
Alice |
| 37 |
DROP TABLE t1, t2, t3, t4, t5; |
| 38 |
create table t1 (c1 varchar(100)); |
| 39 |
create table t2 (c1 varchar(100)); |
| 40 |
create view t3 as select * from t1; |
| 41 |
insert into t1 values ('ann'), ('alice'); |
| 42 |
insert into t2 values ('bob'), ('brian'); |
| 43 |
create temporary table t4 (c1 varchar(100)) engine=MERGE union=(t2, t1); |
| 44 |
create temporary table t5 (c1 varchar(100)) engine=MERGE union=(t3, t1); |
| 45 |
select * from t5; |
| 46 |
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| 47 |
lock tables t1 read, t2 read, t3 read, t4 read; |
| 48 |
select * from t5; |
| 49 |
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| 50 |
select * from t4; |
| 51 |
c1 |
| 52 |
bob |
| 53 |
brian |
| 54 |
ann |
| 55 |
alice |
| 56 |
unlock tables; |
| 57 |
drop table t2; |
| 58 |
create view t2 as select * from t1; |
| 59 |
select * from t4; |
| 60 |
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| 61 |
lock tables t1 read, t2 read, t3 read; |
| 62 |
select * from t4; |
| 63 |
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| 64 |
select * from t4; |
| 65 |
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| 66 |
select * from t4; |
| 67 |
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist |
| 68 |
unlock tables; |
| 69 |
drop view t2, t3; |
| 70 |
drop table t1; |