~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/alter_table.result

  • Committer: Monty Taylor
  • Date: 2009-06-08 13:39:05 UTC
  • mto: This revision was merged to the branch mainline in revision 1060.
  • Revision ID: mordred@inaugust.com-20090608133905-3hogrrafmfg6e5hs
Removed CHARSET_INFO stuff from protocol plugin interface - it makes no sense.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
ALTER TABLE t1 CHANGE NAME NAME CHAR(80) not null;
53
53
SHOW FULL COLUMNS FROM t1;
54
54
Field   Type    Collation       Null    Key     Default Extra   Privileges      Comment
55
 
GROUP_ID        int     NULL    NO      PRI     NULL            #       
56
 
LANG_ID int     NULL    NO      PRI     NULL            #       
 
55
GROUP_ID        int     NULL    NO      PRI     0               #       
 
56
LANG_ID int     NULL    NO      PRI     0               #       
57
57
NAME    varchar(80)     utf8_general_ci NO      MUL     NULL            #       
58
58
DROP TABLE t1;
59
59
create table t1 (n int);
393
393
alter table t1 modify a varchar(10) not null;
394
394
drop table if exists t1;
395
395
create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
396
 
insert into t1 (a) values(1);
 
396
insert into t1 (a,b,c,d,e,f,g,h,i) values(1,1,1,1,1,1,1,1,1);
397
397
show table status like 't1';
398
398
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
399
 
t1      MyISAM  10      Fixed   1       37      X       X       X       X       X       X       X       X       utf8_general_ci NULL            
 
399
t1      MyISAM  X       Fixed   1       37      X       X       X       X       X       X       X       X       utf8_general_ci NULL            
400
400
alter table t1 modify a int;
401
401
show table status like 't1';
402
402
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
403
 
t1      MyISAM  10      Fixed   1       37      X       X       X       X       X       X       X       X       utf8_general_ci NULL            
 
403
t1      MyISAM  X       Fixed   1       37      X       X       X       X       X       X       X       X       utf8_general_ci NULL            
404
404
drop table t1;
405
405
create table t1 (a int not null default 0, b int not null default 0, c int not null default 0, d int not null default 0, e int not null default 0, f int not null default 0, g int not null default 0, h int not null default 0,i int not null default 0, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
406
406
insert into t1 (a) values(1);
407
407
show table status like 't1';
408
408
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
409
 
t1      MyISAM  10      Fixed   1       37      X       X       X       X       X       X       X       X       utf8_general_ci NULL            
 
409
t1      MyISAM  X       Fixed   1       37      X       X       X       X       X       X       X       X       utf8_general_ci NULL            
410
410
drop table t1;
411
411
CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE);
412
412
ALTER TABLE t1 DROP PRIMARY KEY;
414
414
Table   Create Table
415
415
t1      CREATE TABLE `t1` (
416
416
  `a` int NOT NULL,
417
 
  `b` int,
 
417
  `b` int DEFAULT NULL,
418
418
  UNIQUE KEY `b` (`b`)
419
 
) ENGINE=InnoDB
 
419
) ENGINE=DEFAULT
420
420
ALTER TABLE t1 DROP PRIMARY KEY;
421
421
ERROR 42000: Can't DROP 'PRIMARY'; check that column/key exists
422
422
DROP TABLE t1;
581
581
use test;
582
582
drop table t1;
583
583
CREATE TABLE t1(a INT) ROW_FORMAT=FIXED;
 
584
Warnings:
 
585
Warning 1478    InnoDB: assuming ROW_FORMAT=COMPACT.
584
586
CREATE INDEX i1 ON t1(a);
585
587
SHOW CREATE TABLE t1;
586
588
Table   Create Table
587
589
t1      CREATE TABLE `t1` (
588
 
  `a` int,
 
590
  `a` int DEFAULT NULL,
589
591
  KEY `i1` (`a`)
590
 
) ENGINE=InnoDB ROW_FORMAT=FIXED
 
592
) ENGINE=DEFAULT ROW_FORMAT=FIXED
591
593
DROP INDEX i1 ON t1;
592
594
SHOW CREATE TABLE t1;
593
595
Table   Create Table
594
596
t1      CREATE TABLE `t1` (
595
 
  `a` int
596
 
) ENGINE=InnoDB ROW_FORMAT=FIXED
 
597
  `a` int DEFAULT NULL
 
598
) ENGINE=DEFAULT ROW_FORMAT=FIXED
597
599
DROP TABLE t1;
598
600
DROP TABLE IF EXISTS bug24219;
599
601
DROP TABLE IF EXISTS bug24219_2;
711
713
3       3       Stored Functions        You
712
714
2       3       Server  Me
713
715
alter table table_24562 order by 12;
714
 
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '12' at line 1
 
716
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '12' at line 1
715
717
alter table table_24562 order by (section + 12);
716
 
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(section + 12)' at line 1
 
718
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '(section + 12)' at line 1
717
719
alter table table_24562 order by length(title);
718
 
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(title)' at line 1
 
720
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '(title)' at line 1
719
721
alter table table_24562 order by no_such_col;
720
722
ERROR 42S22: Unknown column 'no_such_col' in 'order clause'
721
723
drop table table_24562;
723
725
alter table t1 alter column mycol set default 0;
724
726
desc t1;
725
727
Field   Type    Null    Key     Default Extra
726
 
mycol   int     NO              NULL    
 
728
mycol   int     NO              0       
727
729
drop table t1;
728
730
create table t1(id int primary key auto_increment) engine=heap;
729
731
insert into t1 values (null);
913
915
SHOW CREATE TABLE `tt+1`;
914
916
Table   Create Table
915
917
tt+1    CREATE TEMPORARY TABLE `tt+1` (
916
 
  `c1` int
917
 
) ENGINE=InnoDB
 
918
  `c1` int DEFAULT NULL
 
919
) ENGINE=DEFAULT
918
920
SHOW CREATE TABLE `tt+2`;
919
921
Table   Create Table
920
922
tt+2    CREATE TEMPORARY TABLE `tt+2` (
921
 
  `c1` int
922
 
) ENGINE=InnoDB
 
923
  `c1` int DEFAULT NULL
 
924
) ENGINE=DEFAULT
923
925
DROP TABLE   `tt+1`, `tt+2`;
924
926
CREATE TEMPORARY TABLE `#sql1` (c1 INT);
925
927
CREATE TEMPORARY TABLE `@0023sql2` (c1 INT);
934
936
SHOW CREATE TABLE `#sql2`;
935
937
Table   Create Table
936
938
#sql2   CREATE TEMPORARY TABLE `#sql2` (
937
 
  `c1` int
938
 
) ENGINE=InnoDB
 
939
  `c1` int DEFAULT NULL
 
940
) ENGINE=DEFAULT
939
941
SHOW CREATE TABLE `@0023sql1`;
940
942
Table   Create Table
941
943
@0023sql1       CREATE TEMPORARY TABLE `@0023sql1` (
942
 
  `c1` int
943
 
) ENGINE=InnoDB
 
944
  `c1` int DEFAULT NULL
 
945
) ENGINE=DEFAULT
944
946
DROP TABLE `#sql2`, `@0023sql1`;
945
947
DROP TABLE IF EXISTS t1;
946
948
DROP TABLE IF EXISTS t2;