Debian Codegraph @

mysql-test/suite/ndbcluster/temp_tables.test

raw
1 --source include/have_ndb.inc
2
3 CALL mtr.add_suppression("default_tmp_storage_engine is set to a disabled storage engine .*");
4
5 --echo #
6 --echo # Verifying that temporary tables are handled the same way after
7 --echo # bug#29899151
8 --echo #
9
10 --echo # Verify that creating temporary tables in NDB is rejected
11 --error ER_ILLEGAL_HA_CREATE_OPTION
12 CREATE TEMPORARY TABLE t1(a int PRIMARY KEY, b varchar(255)) ENGINE=NDBCLUSTER;
13
14 CREATE TABLE t1 (a int PRIMARY KEY, b varchar(255)) ENGINE=NDBCLUSTER;
15 CREATE TEMPORARY TABLE tt1 AS SELECT * FROM t1;
16 SHOW CREATE TABLE tt1;
17
18 --echo # CREATE LIKE without engine should fall back to default temp engine
19 --echo # but is rejected earlier due to another condition. (dtjeldvo FIXME)
20 --error ER_PARTITION_NO_TEMPORARY
21 CREATE TEMPORARY TABLE tt1 LIKE t1;
22
23 --echo # Verify that substitution is not done if the default temp engine is set
24 --echo # to NDB (silly configuration)
25 SET default_tmp_storage_engine=NDBCLUSTER;
26
27 --error ER_ILLEGAL_HA_CREATE_OPTION
28 CREATE TEMPORARY TABLE tt1 LIKE t1;
29
30 --echo # Verify that substitution is not done if default temp engine is
31 --echo # disabled
32 SET default_tmp_storage_engine=MEMORY;
33
34 --error ER_ILLEGAL_HA_CREATE_OPTION
35 CREATE TEMPORARY TABLE tt1 LIKE t1;
36
37 SET default_tmp_storage_engine=default;
38 DROP TABLE t1;
39
40 #
41 # alter temporary table to engine=ndb should give an error
42 #
43 CREATE TEMPORARY TABLE t1 (a int KEY) ENGINE=MYISAM;
44 --error ER_PARTITION_NO_TEMPORARY
45 ALTER TABLE t1 ENGINE=NDB;
46 DROP TABLE t1;