| 1 |
CALL mtr.add_suppression("default_tmp_storage_engine is set to a disabled storage engine .*"); |
| 2 |
# |
| 3 |
# Verifying that temporary tables are handled the same way after |
| 4 |
# bug#29899151 |
| 5 |
# |
| 6 |
# Verify that creating temporary tables in NDB is rejected |
| 7 |
CREATE TEMPORARY TABLE t1(a int PRIMARY KEY, b varchar(255)) ENGINE=NDBCLUSTER; |
| 8 |
ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY' |
| 9 |
CREATE TABLE t1 (a int PRIMARY KEY, b varchar(255)) ENGINE=NDBCLUSTER; |
| 10 |
CREATE TEMPORARY TABLE tt1 AS SELECT * FROM t1; |
| 11 |
SHOW CREATE TABLE tt1; |
| 12 |
Table Create Table |
| 13 |
tt1 CREATE TEMPORARY TABLE `tt1` ( |
| 14 |
`a` int NOT NULL, |
| 15 |
`b` varchar(255) DEFAULT NULL |
| 16 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 17 |
# CREATE LIKE without engine should fall back to default temp engine |
| 18 |
# but is rejected earlier due to another condition. (dtjeldvo FIXME) |
| 19 |
CREATE TEMPORARY TABLE tt1 LIKE t1; |
| 20 |
ERROR HY000: Cannot create temporary table with partitions |
| 21 |
# Verify that substitution is not done if the default temp engine is set |
| 22 |
# to NDB (silly configuration) |
| 23 |
SET default_tmp_storage_engine=NDBCLUSTER; |
| 24 |
CREATE TEMPORARY TABLE tt1 LIKE t1; |
| 25 |
ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY' |
| 26 |
# Verify that substitution is not done if default temp engine is |
| 27 |
# disabled |
| 28 |
SET default_tmp_storage_engine=MEMORY; |
| 29 |
CREATE TEMPORARY TABLE tt1 LIKE t1; |
| 30 |
ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY' |
| 31 |
SET default_tmp_storage_engine=default; |
| 32 |
DROP TABLE t1; |
| 33 |
CREATE TEMPORARY TABLE t1 (a int KEY) ENGINE=MYISAM; |
| 34 |
ALTER TABLE t1 ENGINE=NDB; |
| 35 |
ERROR HY000: Cannot create temporary table with partitions |
| 36 |
DROP TABLE t1; |