Debian Codegraph @

mysql-test/suite/ndb/t/ndb_temporary.test

raw
1 -- source include/have_ndb.inc
2
3 #
4 # creating a temporary table with engine=ndb should give an error
5 #
6 --error ER_ILLEGAL_HA_CREATE_OPTION
7 create temporary table t1 (a int key) engine=ndb;
8
9
10 #
11 # alter temporary table to engine=ndb should give an error
12 #
13 create temporary table t1 (a int key) engine=myisam;
14 --error ER_PARTITION_NO_TEMPORARY
15 alter table t1 engine=ndb;
16 --error ER_PARTITION_NO_TEMPORARY
17 alter table t1 algorithm=copy, engine=ndb;
18 drop table t1;
19
20
21 #
22 # create temporary like on an ndb table should give an error (bug#57437)
23 #
24 CREATE TABLE bar ( id TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY ) ENGINE=NDBCluster ;
25 --error ER_PARTITION_NO_TEMPORARY
26 CREATE TEMPORARY TABLE foo LIKE bar ;
27 DROP TABLE bar;
28
29 #
30 # When default storage engine=ndb, temporary tables
31 # without explicit engine= should be created using the
32 # default temporary table engine
33 #
34 SET SESSION default_storage_engine=NDBCLUSTER;
35 create table t1 (a int key);
36
37 # verify that we have a ndb table
38 select engine from information_schema.tables where table_name = 't1';
39 drop table t1;
40
41 # verify that we have a myisam table
42 create temporary table t1 (a int key);
43 --disable_warnings
44 show create table t1;
45 --enable_warnings
46 drop table t1;