19
create table t1 (a int not null auto_increment,primary key (a)) engine=heap;
19
create temporary table t1 (a int not null auto_increment,primary key (a)) engine=heap;
21
create table t2 engine=heap select * from t1;
21
create temporary table t2 engine=heap select * from t1;
22
22
ERROR 42S02: Table 'test.t1' doesn't exist
23
23
create table t2 select auto+1 from t1;
24
24
ERROR 42S02: Table 'test.t1' doesn't exist
28
28
Note 1051 Unknown table 't2'
29
29
create table t1 (b char(0) not null, index(b));
30
30
ERROR 42000: The used storage engine can't index column 'b'
31
create table t1 (a int not null,b text) engine=heap;
31
create temporary table t1 (a int not null,b text) engine=heap;
32
32
ERROR 42000: The used table type doesn't support BLOB/TEXT columns
33
33
drop table if exists t1;
35
35
Note 1051 Unknown table 't1'
36
create table t1 (ordid int not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap;
36
create temporary table t1 (ordid int not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap;
37
37
ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
38
38
create table not_existing_database.test (a int);
39
39
ERROR 42000: Unknown database 'not_existing_database'
656
656
`a2` int DEFAULT NULL
658
658
drop table t1, t2;
659
create table t1 (i int) engine=myisam max_rows=100000000000;
660
show create table t1;
662
t1 CREATE TABLE `t1` (
664
) ENGINE=MyISAM MAX_ROWS=100000000000
665
alter table t1 max_rows=100;
666
show create table t1;
668
t1 CREATE TABLE `t1` (
670
) ENGINE=MyISAM MAX_ROWS=100
671
alter table t1 max_rows=100000000000;
672
show create table t1;
674
t1 CREATE TABLE `t1` (
676
) ENGINE=MyISAM MAX_ROWS=100000000000
678
659
create table t1 select * from t2;
679
660
ERROR 42S02: Table 'test.t2' doesn't exist
680
661
create table t1 select * from t1;
707
688
ERROR 42S02: Table 'test.t1' doesn't exist
709
690
ERROR 42S02: Unknown table 't1'
710
create table t1 (i int);
711
insert into t1 values (1), (2);
713
create table t2 select * from t1;
714
ERROR HY000: Table 't2' was not locked with LOCK TABLES
715
create table if not exists t2 select * from t1;
716
ERROR HY000: Table 't2' was not locked with LOCK TABLES
718
create table t2 (j int);
720
create table t2 select * from t1;
721
ERROR HY000: Table 't2' was not locked with LOCK TABLES
722
create table if not exists t2 select * from t1;
723
ERROR HY000: Table 't2' was not locked with LOCK TABLES
725
lock table t1 read, t2 read;
726
create table t2 select * from t1;
727
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
728
create table if not exists t2 select * from t1;
729
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
731
lock table t1 read, t2 write;
732
create table t2 select * from t1;
733
ERROR 42S01: Table 't2' already exists
734
create table if not exists t2 select * from t1;
736
Note 1050 Table 't2' already exists
744
create temporary table t2 select * from t1;
745
create temporary table if not exists t2 select * from t1;
747
Note 1050 Table 't2' already exists
756
691
create table t1 (upgrade int);
758
693
create table t1 (
1427
1362
CREATE TABLE t1(c1 VARCHAR(33), KEY (c1) USING BTREE);
1429
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1) USING HASH) ENGINE=MEMORY;
1364
CREATE TEMPORARY TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1) USING HASH) ENGINE=MEMORY;
1430
1365
SHOW INDEX FROM t1;
1431
1366
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
1432
1367
t1 1 c1 1 c1 NULL 0 NULL NULL YES HASH
1434
CREATE TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) ENGINE=MEMORY;
1369
CREATE TEMPORARY TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) ENGINE=MEMORY;
1435
1370
SHOW INDEX FROM t1;
1436
1371
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
1437
1372
t1 1 c1 1 c1 A NULL NULL NULL YES BTREE