~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/create.test

  • Committer: lbieber
  • Date: 2010-10-06 16:34:16 UTC
  • mfrom: (1816.1.3 build)
  • Revision ID: lbieber@orisndriz08-20101006163416-ea0sl59qgpglk21y
Merge Monty - Change the requirement from either libinnodb to libhaildb. Also, tied it to version 2.2
Merge Andrew - fix bug 650935: remove --compress from all clients
Merge Andrew - fix bug 653471: Add -A to drizzle client
Merge Travis - 621861 = To change C structs to C++ classes in Drizzle

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
# Test of some CREATE TABLE'S that should fail
27
27
#
28
28
 
29
 
--error ER_TABLE_UNKNOWN
 
29
--error ER_NO_SUCH_TABLE
30
30
create temporary table t2 engine=MEMORY select * from t1;
31
 
--error ER_TABLE_UNKNOWN
 
31
--error ER_NO_SUCH_TABLE
32
32
create table t2 select auto+1 from t1;
33
33
drop table if exists t1,t2;
34
34
--error ER_WRONG_KEY_COLUMN
40
40
--error ER_WRONG_AUTO_KEY
41
41
create temporary table t1 (ordid int not null auto_increment, ord  varchar(50) not null, primary key (ord,ordid)) engine=MEMORY;
42
42
 
 
43
-- error 1049
43
44
create table not_existing_database.test (a int);
44
45
create table `a/a` (a int);
45
46
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
162
162
INSERT INTO t1 values (1),(2),(1);
163
163
--error ER_DUP_ENTRY
164
164
CREATE TABLE t2 (primary key(a)) SELECT * FROM t1;
165
 
--error ER_TABLE_UNKNOWN
 
165
--error ER_NO_SUCH_TABLE
166
166
SELECT * from t2;
167
167
DROP TABLE t1;
168
168
DROP TABLE IF EXISTS t2;
247
247
create table if not exists t1 select 3 as 'a',3 as 'b';
248
248
show warnings;
249
249
--replace_column 3 # 4 # 5 #
250
 
select * from DATA_DICTIONARY.TABLE_DEFINITION_CACHE WHERE TABLE_COUNT AND TABLE_SCHEMA = SCHEMA() > 1 ORDER BY TABLE_SCHEMA, TABLE_NAME;
 
250
select * from DATA_DICTIONARY.TABLE_DEFINITION_CACHE WHERE TABLE_COUNT > 1 ORDER BY TABLE_SCHEMA, TABLE_NAME;
251
251
select * from t1;
252
252
drop table t1;
253
253
 
314
314
create database mysqltest;
315
315
create table mysqltest.t3 like t1;
316
316
create temporary table t3 like mysqltest.t3;
317
 
 
318
317
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
319
318
show create table t3;
320
 
 
321
319
create table t2 like t3;
322
 
 
323
320
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
324
321
show create table t2;
325
322
select * from t2;
326
 
 
327
323
--error ER_TABLE_EXISTS_ERROR
328
324
create table t3 like t1;
329
 
 
330
325
--error ER_TABLE_EXISTS_ERROR
331
326
create table t3 like mysqltest.t3;
332
 
 
333
327
--error ER_BAD_DB_ERROR
334
328
create table non_existing_database.t1 like t1;
335
 
 
336
 
--error ER_TABLE_UNKNOWN
337
 
create table t4 like non_existing_table;
338
 
 
 
329
--error ER_NO_SUCH_TABLE
 
330
create table t3 like non_existing_table;
339
331
--error ER_TABLE_EXISTS_ERROR
340
332
create temporary table t3 like t1;
341
333
drop table t1, t2, t3;
390
382
drop table t1, t2;
391
383
 
392
384
create table t1 (a int, b int, d int, e bigint, f float(3,2), g double(4,3), h decimal(5,4), j date, k timestamp, l datetime, m enum('a','b'), o char(10));
393
 
SHOW CREATE TABLE t1;
394
385
create table t2 select ifnull(a,a), ifnull(b,b), ifnull(d,d), ifnull(e,e), ifnull(f,f), ifnull(g,g), ifnull(h,h), ifnull(j,j), ifnull(k,k), ifnull(l,l), ifnull(m,m), ifnull(o,o) from t1;
395
386
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
396
387
show create table t2;
664
655
#  of error it is automatically dropped if it has not existed before.)
665
656
#
666
657
# Error during open_and_lock_tables() of tables
667
 
--error ER_TABLE_UNKNOWN
 
658
--error ER_NO_SUCH_TABLE
668
659
create table t1 select * from t2;
669
660
# Rather special error which also caught during open tables pahse
670
661
--error ER_UPDATE_TABLE_USED
715
706
create table if not exists t1 select 1;
716
707
select * from t1;
717
708
drop temporary table t1;
718
 
--error ER_TABLE_UNKNOWN
 
709
--error ER_NO_SUCH_TABLE
719
710
select * from t1;
720
711
--error ER_BAD_TABLE_ERROR
721
712
drop table t1;
1177
1168
 
1178
1169
--error ER_WRONG_DB_NAME
1179
1170
USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
1180
 
#--error ER_WRONG_DB_NAME
 
1171
--error ER_WRONG_DB_NAME
1181
1172
SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
1182
1173
 
1183
1174
##
1221
1212
#
1222
1213
# Bug#25629 CREATE TABLE LIKE does not work with INFORMATION_SCHEMA
1223
1214
#
1224
 
--error ER_CANT_CREATE_TABLE,ER_TABLE_PERMISSION_DENIED
 
1215
--error ER_CANT_CREATE_TABLE
1225
1216
create table t1 like data_dictionary.processlist;
1226
1217
create table t1 like data_dictionary.processlist engine=innodb;
1227
1218
show create table t1;
1228
1219
drop table t1;
1229
 
--error ER_CANT_CREATE_TABLE,ER_TABLE_PERMISSION_DENIED
 
1220
--error ER_CANT_CREATE_TABLE
1230
1221
create temporary table t1 like data_dictionary.processlist;
1231
1222
create temporary table t1 like data_dictionary.processlist engine=myisam;
1232
1223
show create table t1;