~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/create.result

  • Committer: lbieber
  • Date: 2010-10-02 04:02:25 UTC
  • mfrom: (1806.1.1 build)
  • Revision ID: lbieber@orisndriz08-20101002040225-w8mn2h0nh5587a6f
Merge Andrew: fix bug 652966 - Drizzledump migration code doesn't handle YEAR type

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
create temporary table t1 (a int not null auto_increment,primary key (a)) engine=MEMORY;
20
20
drop table t1;
21
21
create temporary table t2 engine=MEMORY select * from t1;
22
 
ERROR 42S02: Unknown table 'test.t1'
 
22
ERROR 42S02: Table 'test.t1' doesn't exist
23
23
create table t2 select auto+1 from t1;
24
 
ERROR 42S02: Unknown table 'test.t1'
 
24
ERROR 42S02: Table 'test.t1' doesn't exist
25
25
drop table if exists t1,t2;
26
26
Warnings:
27
27
Note    1051    Unknown table 't1'
36
36
create temporary table t1 (ordid int not null auto_increment, ord  varchar(50) not null, primary key (ord,ordid)) engine=MEMORY;
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
 
ERROR 42000: Unknown schema 'not_existing_database'
 
39
ERROR 42000: Unknown database 'not_existing_database'
40
40
create table `a/a` (a int);
41
41
show create table `a/a`;
42
42
Table   Create Table
86
86
drop table t1;
87
87
drop database if exists mysqltest;
88
88
Warnings:
89
 
Note    1008    Can't drop schema 'mysqltest'; schema doesn't exist
 
89
Note    1008    Can't drop database 'mysqltest'; database doesn't exist
90
90
create database mysqltest;
91
91
create table mysqltest.$test1 (a$1 int, $b int, c$ int);
92
92
insert into mysqltest.$test1 values (1,2,3);
167
167
CREATE TABLE t2 (primary key(a)) SELECT * FROM t1;
168
168
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
169
169
SELECT * from t2;
170
 
ERROR 42S02: Unknown table 'test.t2'
 
170
ERROR 42S02: Table 'test.t2' doesn't exist
171
171
DROP TABLE t1;
172
172
DROP TABLE IF EXISTS t2;
173
173
Warnings:
280
280
Level   Code    Message
281
281
Note    1050    Table 't1' already exists
282
282
Error   1062    Duplicate entry '3' for key 'PRIMARY'
283
 
select * from DATA_DICTIONARY.TABLE_DEFINITION_CACHE WHERE TABLE_COUNT AND TABLE_SCHEMA = SCHEMA() > 1 ORDER BY TABLE_SCHEMA, TABLE_NAME;
 
283
select * from DATA_DICTIONARY.TABLE_DEFINITION_CACHE WHERE TABLE_COUNT > 1 ORDER BY TABLE_SCHEMA, TABLE_NAME;
284
284
TABLE_SCHEMA    TABLE_NAME      VERSION TABLE_COUNT     IS_NAME_LOCKED
285
285
select * from t1;
286
286
a       b
290
290
create table `t1 `(a int);
291
291
ERROR 42000: Incorrect table name 't1 '
292
292
create database `db1 `;
293
 
ERROR 42000: Incorrect schema name 'db1 '
 
293
ERROR 42000: Incorrect database name 'db1 '
294
294
create table t1(`a ` int);
295
295
ERROR 42000: Incorrect column name 'a '
296
296
create table t1 (a int,);
362
362
select * from t2;
363
363
id      name
364
364
create table t3 like t1;
365
 
ERROR 42S01: Table 'test.t3' already exists
 
365
ERROR 42S01: Table 't3' already exists
366
366
create table t3 like mysqltest.t3;
367
 
ERROR 42S01: Table 'test.t3' already exists
 
367
ERROR 42S01: Table 't3' already exists
368
368
create table non_existing_database.t1 like t1;
369
 
ERROR 42000: Unknown schema 'non_existing_database'
370
 
create table t4 like non_existing_table;
371
 
ERROR 42S02: Unknown table 'test.non_existing_table'
 
369
ERROR 42000: Unknown database 'non_existing_database'
 
370
create table t3 like non_existing_table;
 
371
ERROR 42S02: Table 'test.non_existing_table' doesn't exist
372
372
create temporary table t3 like t1;
373
 
ERROR 42S01: Table 'test.#t3' already exists
 
373
ERROR 42S01: Table 't3' already exists
374
374
drop table t1, t2, t3;
375
375
drop database mysqltest;
376
376
SET SESSION storage_engine="MEMORY";
441
441
2       -2      2       1825-12-14      a       2003-01-01 03:02:01     binary data
442
442
drop table t1, t2;
443
443
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));
444
 
SHOW CREATE TABLE t1;
445
 
Table   Create Table
446
 
t1      CREATE TABLE `t1` (
447
 
  `a` INT DEFAULT NULL,
448
 
  `b` INT DEFAULT NULL,
449
 
  `d` INT DEFAULT NULL,
450
 
  `e` BIGINT DEFAULT NULL,
451
 
  `f` DOUBLE(3,2) DEFAULT NULL,
452
 
  `g` DOUBLE(4,3) DEFAULT NULL,
453
 
  `h` DECIMAL(5,4) DEFAULT NULL,
454
 
  `j` DATE DEFAULT NULL,
455
 
  `k` TIMESTAMP NULL DEFAULT NULL,
456
 
  `l` DATETIME DEFAULT NULL,
457
 
  `m` ENUM('a','b') DEFAULT NULL,
458
 
  `o` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL
459
 
) ENGINE=InnoDB COLLATE = utf8_general_ci
460
444
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;
461
445
show create table t2;
462
446
Table   Create Table
540
524
create table t1(test.column.name int);
541
525
ERROR 42000: Incorrect table name 'column'
542
526
create table t1(xyz.t1.name int);
543
 
ERROR 42000: Incorrect schema name 'xyz'
 
527
ERROR 42000: Incorrect database name 'xyz'
544
528
create table t1(t1.name int);
545
529
create table t2(test.t2.name int);
546
530
drop table t1,t2;
559
543
use mysqltest;
560
544
drop database mysqltest;
561
545
create table test.t1 like x;
562
 
ERROR 3D000: No schema selected
 
546
ERROR 3D000: No database selected
563
547
drop table if exists test.t1;
564
548
create database mysqltest;
565
549
create database if not exists mysqltest;
566
550
Warnings:
567
 
Note    1007    Can't create schema 'mysqltest'; schema exists
 
551
Note    1007    Can't create database 'mysqltest'; database exists
568
552
show create database mysqltest;
569
553
Database        Create Database
570
554
mysqltest       CREATE DATABASE `mysqltest` COLLATE = utf8_general_ci
682
666
) ENGINE=DEFAULT COLLATE = utf8_general_ci
683
667
drop table t1, t2;
684
668
create table t1 select * from t2;
685
 
ERROR 42S02: Unknown table 'test.t2'
 
669
ERROR 42S02: Table 'test.t2' doesn't exist
686
670
create table t1 select * from t1;
687
671
ERROR HY000: You can't specify target table 't1' for update in FROM clause
688
672
create table t1 select coalesce('a' collate utf8_swedish_ci,'b' collate utf8_bin);
710
694
1
711
695
drop temporary table t1;
712
696
select * from t1;
713
 
ERROR 42S02: Unknown table 'test.t1'
 
697
ERROR 42S02: Table 'test.t1' doesn't exist
714
698
drop table t1;
715
699
ERROR 42S02: Unknown table 't1'
716
700
create table t1 (upgrade int);
1415
1399
a       b
1416
1400
drop table t1,t2;
1417
1401
CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
1418
 
ERROR 42000: Incorrect schema name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
 
1402
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
1419
1403
DROP DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
1420
 
ERROR 42000: Incorrect schema name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
 
1404
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
1421
1405
USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
1422
 
ERROR 42000: Incorrect schema name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
 
1406
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
1423
1407
SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
1424
 
Database        Create Database
 
1408
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
1425
1409
create database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
1426
1410
use имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
1427
1411
select database();
1460
1444
) ENGINE=DEFAULT COLLATE = utf8_general_ci
1461
1445
drop table имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
1462
1446
create table t1 like data_dictionary.processlist;
1463
 
Got one of the listed errors
 
1447
ERROR HY000: Can't create table 'test.t1' (errno: 1)
1464
1448
create table t1 like data_dictionary.processlist engine=innodb;
1465
1449
show create table t1;
1466
1450
Table   Create Table
1467
1451
t1      CREATE TABLE `t1` (
1468
1452
  `ID` BIGINT NOT NULL,
1469
 
  `USERNAME` VARCHAR(16) NOT NULL,
 
1453
  `USER` VARCHAR(16) NOT NULL,
1470
1454
  `HOST` VARCHAR(1025) NOT NULL,
1471
 
  `DB` VARCHAR(256) DEFAULT NULL,
 
1455
  `DB` VARCHAR(256) NOT NULL,
1472
1456
  `COMMAND` VARCHAR(16) NOT NULL,
1473
 
  `TIME` BIGINT UNSIGNED NOT NULL,
 
1457
  `TIME` BIGINT NOT NULL,
1474
1458
  `STATE` VARCHAR(256) DEFAULT NULL,
1475
 
  `INFO` VARCHAR(100) DEFAULT NULL,
1476
 
  `HAS_GLOBAL_LOCK` BOOLEAN NOT NULL
 
1459
  `INFO` VARCHAR(100) DEFAULT NULL
1477
1460
) ENGINE=InnoDB COLLATE = utf8_general_ci
1478
1461
drop table t1;
1479
1462
create temporary table t1 like data_dictionary.processlist;
1480
 
Got one of the listed errors
 
1463
ERROR HY000: Can't create table 'test.#t1' (errno: 138)
1481
1464
create temporary table t1 like data_dictionary.processlist engine=myisam;
1482
1465
show create table t1;
1483
1466
Table   Create Table
1484
1467
t1      CREATE TEMPORARY TABLE `t1` (
1485
1468
  `ID` BIGINT NOT NULL,
1486
 
  `USERNAME` VARCHAR(16) NOT NULL,
 
1469
  `USER` VARCHAR(16) NOT NULL,
1487
1470
  `HOST` VARCHAR(1025) NOT NULL,
1488
 
  `DB` VARCHAR(256) DEFAULT NULL,
 
1471
  `DB` VARCHAR(256) NOT NULL,
1489
1472
  `COMMAND` VARCHAR(16) NOT NULL,
1490
 
  `TIME` BIGINT UNSIGNED NOT NULL,
 
1473
  `TIME` BIGINT NOT NULL,
1491
1474
  `STATE` VARCHAR(256) DEFAULT NULL,
1492
 
  `INFO` VARCHAR(100) DEFAULT NULL,
1493
 
  `HAS_GLOBAL_LOCK` BOOLEAN NOT NULL
 
1475
  `INFO` VARCHAR(100) DEFAULT NULL
1494
1476
) ENGINE=MyISAM COLLATE = utf8_general_ci
1495
1477
drop table t1;
1496
1478