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 #
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
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
411
411
CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE);
412
412
ALTER TABLE t1 DROP PRIMARY KEY;
583
583
CREATE TABLE t1(a INT) ROW_FORMAT=FIXED;
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` (
590
`a` int DEFAULT NULL,
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` (
596
) ENGINE=InnoDB ROW_FORMAT=FIXED
598
) ENGINE=DEFAULT ROW_FORMAT=FIXED
598
600
DROP TABLE IF EXISTS bug24219;
599
601
DROP TABLE IF EXISTS bug24219_2;
711
713
3 3 Stored Functions You
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;
913
915
SHOW CREATE TABLE `tt+1`;
914
916
Table Create Table
915
917
tt+1 CREATE TEMPORARY TABLE `tt+1` (
918
`c1` int DEFAULT NULL
918
920
SHOW CREATE TABLE `tt+2`;
919
921
Table Create Table
920
922
tt+2 CREATE TEMPORARY TABLE `tt+2` (
923
`c1` int DEFAULT NULL
923
925
DROP TABLE `tt+1`, `tt+2`;
924
926
CREATE TEMPORARY TABLE `#sql1` (c1 INT);
925
927
CREATE TEMPORARY TABLE `@0023sql2` (c1 INT);