~drizzle-pbxt/drizzle/drizzle-pbxt-2

« back to all changes in this revision

Viewing changes to tests/r/create.result

  • Committer: Paul McCullagh
  • Date: 2009-11-10 14:18:39 UTC
  • mfrom: (1038.1.7 drizzle-pbxt-pre-merge)
  • Revision ID: paul.mccullagh@primebase.org-20091110141839-2j3k43b17ag6f605
Merged Drizzle trunk and PBXT 1.0.09

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
select * from t1;
17
17
b
18
18
drop table t1;
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;
20
20
drop table t1;
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;
34
34
Warnings:
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'
213
213
SELECT @@storage_engine;
214
214
@@storage_engine
215
215
MEMORY
216
 
CREATE TABLE t1 (a int not null);
 
216
CREATE TEMPORARY TABLE t1 (a int not null);
217
217
show create table t1;
218
218
Table   Create Table
219
 
t1      CREATE TABLE `t1` (
 
219
t1      CREATE TEMPORARY TABLE `t1` (
220
220
  `a` int NOT NULL
221
221
) ENGINE=MEMORY
222
222
drop table t1;
225
225
SELECT @@storage_engine;
226
226
@@storage_engine
227
227
MEMORY
228
 
CREATE TABLE t1 (a int not null);
 
228
CREATE TEMPORARY TABLE t1 (a int not null);
229
229
show create table t1;
230
230
Table   Create Table
231
 
t1      CREATE TABLE `t1` (
 
231
t1      CREATE TEMPORARY TABLE `t1` (
232
232
  `a` int NOT NULL
233
233
) ENGINE=MEMORY
234
234
SET SESSION storage_engine=default;
368
368
SELECT @@storage_engine;
369
369
@@storage_engine
370
370
MEMORY
371
 
CREATE TABLE t1 (a int not null);
 
371
CREATE TEMPORARY TABLE t1 (a int not null);
372
372
show create table t1;
373
373
Table   Create Table
374
 
t1      CREATE TABLE `t1` (
 
374
t1      CREATE TEMPORARY TABLE `t1` (
375
375
  `a` int NOT NULL
376
376
) ENGINE=MEMORY
377
377
drop table t1;
380
380
SELECT @@storage_engine;
381
381
@@storage_engine
382
382
MEMORY
383
 
CREATE TABLE t1 (a int not null);
 
383
CREATE TEMPORARY TABLE t1 (a int not null);
384
384
show create table t1;
385
385
Table   Create Table
386
 
t1      CREATE TABLE `t1` (
 
386
t1      CREATE TEMPORARY TABLE `t1` (
387
387
  `a` int NOT NULL
388
388
) ENGINE=MEMORY
389
389
SET SESSION storage_engine=default;
656
656
  `a2` int DEFAULT NULL
657
657
) ENGINE=DEFAULT
658
658
drop table t1, t2;
659
 
create table t1 (i int) engine=myisam max_rows=100000000000;
660
 
show create table t1;
661
 
Table   Create Table
662
 
t1      CREATE TABLE `t1` (
663
 
  `i` int DEFAULT NULL
664
 
) ENGINE=MyISAM MAX_ROWS=100000000000
665
 
alter table t1 max_rows=100;
666
 
show create table t1;
667
 
Table   Create Table
668
 
t1      CREATE TABLE `t1` (
669
 
  `i` int DEFAULT NULL
670
 
) ENGINE=MyISAM MAX_ROWS=100
671
 
alter table t1 max_rows=100000000000;
672
 
show create table t1;
673
 
Table   Create Table
674
 
t1      CREATE TABLE `t1` (
675
 
  `i` int DEFAULT NULL
676
 
) ENGINE=MyISAM MAX_ROWS=100000000000
677
 
drop table t1;
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
708
689
drop table t1;
709
690
ERROR 42S02: Unknown table 't1'
710
 
create table t1 (i int);
711
 
insert into t1 values (1), (2);
712
 
lock tables t1 read;
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
717
 
unlock tables;
718
 
create table t2 (j int);
719
 
lock tables t1 read;
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
724
 
unlock 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
730
 
unlock tables;
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;
735
 
Warnings:
736
 
Note    1050    Table 't2' already exists
737
 
select * from t1;
738
 
i
739
 
1
740
 
2
741
 
unlock tables;
742
 
drop table t2;
743
 
lock tables t1 read;
744
 
create temporary table t2 select * from t1;
745
 
create temporary table if not exists t2 select * from t1;
746
 
Warnings:
747
 
Note    1050    Table 't2' already exists
748
 
select * from t2;
749
 
i
750
 
1
751
 
2
752
 
1
753
 
2
754
 
unlock tables;
755
 
drop table t1, t2;
756
691
create table t1 (upgrade int);
757
692
drop table t1;
758
693
create table t1 (
1426
1361
DROP TABLE t1;
1427
1362
CREATE TABLE t1(c1 VARCHAR(33), KEY (c1) USING BTREE);
1428
1363
DROP TABLE t1;
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            
1433
1368
DROP TABLE t1;
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