~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/create.test

  • Committer: Brian Aker
  • Date: 2009-04-01 01:25:04 UTC
  • mfrom: (968.2.27 mordred)
  • Revision ID: brian@tangent.org-20090401012504-mq9sxcmph5jc1fh6
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
-- error 1049
44
44
create table not_existing_database.test (a int);
45
45
create table `a/a` (a int);
 
46
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
46
47
show create table `a/a`;
47
48
create table t1 like `a/a`;
48
49
drop table `a/a`;
167
168
#
168
169
 
169
170
create table t1 (a int not null, b int, primary key(a), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b));
 
171
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
170
172
show create table t1;
171
173
drop table t1;
172
174
create table t1 select if(1,'1','0'), month("2002-08-02");
287
289
create table t2(id int not null);
288
290
insert into t2 values(10),(20);
289
291
create table t3 like t1;
 
292
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
290
293
show create table t3;
291
294
select * from t3;
292
295
# Disable PS becasue of @@warning_count
295
298
select @@warning_count;
296
299
--enable_ps_protocol
297
300
create temporary table t3 like t2;
 
301
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
298
302
show create table t3;
299
303
select * from t3;
300
304
drop table t3;
 
305
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
301
306
show create table t3;
302
307
select * from t3;
303
308
drop table t2, t3;
304
309
create database mysqltest;
305
310
create table mysqltest.t3 like t1;
306
311
create temporary table t3 like mysqltest.t3;
 
312
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
307
313
show create table t3;
308
314
create table t2 like t3;
 
315
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
309
316
show create table t2;
310
317
select * from t2;
311
318
create table t3 like t1;
371
378
 
372
379
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));
373
380
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;
 
381
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
374
382
show create table t2;
375
383
drop table t1,t2;
376
384
 
427
435
#create table t1 (a int, index `PRIMARY` (a));
428
436
#
429
437
#create table t1 (`primary` int, index(`primary`));
 
438
#--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
430
439
#show create table t1;
431
440
#create table t2 (`PRIMARY` int, index(`PRIMARY`));
 
441
#--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
432
442
#show create table t2;
433
443
#
434
444
#create table t3 (a int);
439
449
#
440
450
#create table t4 (`primary` int);
441
451
#alter table t4 add index(`primary`);
 
452
#--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
442
453
#show create table t4;
443
454
#create table t5 (`PRIMARY` int);
444
455
#alter table t5 add index(`PRIMARY`);
 
456
#--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
445
457
#show create table t5;
446
458
#
447
459
#drop table t1, t2, t3, t4, t5;
534
546
  primary key (a)
535
547
) select 'test' as a ;
536
548
#--warning 1364
 
549
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
537
550
show create table t1;
538
551
drop table t1;
539
552
 
551
564
  a varchar(12) collate utf8_bin not null, 
552
565
  b int not null, primary key (a)
553
566
) select a, 1 as b from t2 ;
 
567
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
554
568
show create table t1;
555
569
drop table t1;
556
570
 
564
578
  a varchar(12) collate utf8_bin not null, 
565
579
  b int null, primary key (a)
566
580
) select a, 1 as c from t2 ;
 
581
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
567
582
show create table t1;
568
583
drop table t1;
569
584
 
571
586
  a varchar(12) collate utf8_bin not null,
572
587
  b int not null, primary key (a)
573
588
) select 'a' as a , 1 as b from t2 ;
 
589
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
574
590
show create table t1;
575
591
drop table t1;
576
592
 
578
594
  a varchar(12) collate utf8_bin,
579
595
  b int not null, primary key (a)
580
596
) select 'a' as a , 1 as b from t2 ;
 
597
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
581
598
show create table t1;
582
599
drop table t1, t2;
583
600
 
620
637
 
621
638
create table t2 ( a int default 3, b int default 3)
622
639
  select a1,a2 from t1;
 
640
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
623
641
show create table t2;
624
642
 
625
643
drop table t1, t2;
908
926
);
909
927
 
910
928
# Check that the table is not corrupted
 
929
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
911
930
show create table t1;
912
931
flush tables;
 
932
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
913
933
show create table t1;
914
934
 
915
935
# Repeat test using ALTER to add indexes
1055
1075
 add key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (
1056
1076
  c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16);
1057
1077
 
 
1078
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
1058
1079
show create table t1;
1059
1080
flush tables;
 
1081
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
1060
1082
show create table t1;
1061
1083
 
1062
1084
# Test the server limits; if any of these pass, all above tests need
1086
1108
alter table t1 add key 
1087
1109
 a001_long_123456789_123456789_123456789_123456789_123456789_12345 (c1);
1088
1110
 
 
1111
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
1089
1112
show create table t1;
1090
1113
 
1091
1114
drop table t1;
1238
1261
select INDEX_NAME from information_schema.statistics where
1239
1262
table_schema='test';
1240
1263
 
 
1264
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
1241
1265
show create table имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
1242
1266
 
1243
1267
drop table имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
1281
1305
 
1282
1306
--echo
1283
1307
 
 
1308
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
1284
1309
SHOW CREATE TABLE t1;
1285
1310
 
1286
1311
--echo
1289
1314
 
1290
1315
--echo
1291
1316
 
 
1317
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
1292
1318
SHOW CREATE TABLE t2;
1293
1319
 
1294
1320
--echo