Commit 80abbcd0 authored by unknown's avatar unknown

Remove extra space in SHOW CREATE TABLE output. (Bug #13883)


mysql-test/r/alter_table.result:
  Update test results
mysql-test/r/archive_bitfield.result:
  Update test results
mysql-test/r/create.result:
  Update test results
mysql-test/r/ctype_tis620.result:
  Update test results
mysql-test/r/gis-rtree.result:
  Update test results
mysql-test/r/index_merge_innodb.result:
  Update test results
mysql-test/r/information_schema.result:
  Update test results
mysql-test/r/innodb.result:
  Update test results
mysql-test/r/key.result:
  Update test results
mysql-test/r/merge.result:
  Update test results
mysql-test/r/partition.result:
  Update test results
mysql-test/r/partition_range.result:
  Update test results
mysql-test/r/rpl000002.result:
  Update test results
mysql-test/r/rpl_multi_engine.result:
  Update test results
mysql-test/r/show_check.result:
  Update test results
mysql-test/r/sql_mode.result:
  Update test results
mysql-test/r/strict.result:
  Update test results
mysql-test/r/symlink.result:
  Update test results
mysql-test/r/system_mysql_db.result:
  Update test results
mysql-test/r/type_blob.result:
  Update test results
sql/sql_show.cc:
  Avoid adding extra space between 'PRIMARY KEY' and key fields in
  SHOW CREATE TABLE output.
parent c93a8ebb
...@@ -390,7 +390,7 @@ show create table t2; ...@@ -390,7 +390,7 @@ show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` varchar(10) NOT NULL, `a` varchar(10) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`)
flush tables; flush tables;
alter table t1 modify a varchar(10) not null; alter table t1 modify a varchar(10) not null;
...@@ -398,7 +398,7 @@ show create table t2; ...@@ -398,7 +398,7 @@ show create table t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` varchar(10) NOT NULL, `a` varchar(10) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`)
drop table if exists t1, t2; drop table if exists t1, t2;
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; 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;
......
...@@ -8,7 +8,7 @@ Table Create Table ...@@ -8,7 +8,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`pk1` int(11) NOT NULL auto_increment, `pk1` int(11) NOT NULL auto_increment,
`b` bit(64) default NULL, `b` bit(64) default NULL,
PRIMARY KEY (`pk1`) PRIMARY KEY (`pk1`)
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
insert into t1 values insert into t1 values
(NULL,b'1111111111111111111111111111111111111111111111111111111111111111'), (NULL,b'1111111111111111111111111111111111111111111111111111111111111111'),
......
...@@ -175,7 +175,7 @@ Table Create Table ...@@ -175,7 +175,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` int(11) default NULL, `b` int(11) default NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `b` (`b`), KEY `b` (`b`),
KEY `b_2` (`b`), KEY `b_2` (`b`),
KEY `b_3` (`b`), KEY `b_3` (`b`),
...@@ -643,7 +643,7 @@ show create table t1; ...@@ -643,7 +643,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` varchar(112) character set utf8 collate utf8_bin NOT NULL, `a` varchar(112) character set utf8 collate utf8_bin NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
CREATE TABLE t2 ( CREATE TABLE t2 (
...@@ -659,7 +659,7 @@ Table Create Table ...@@ -659,7 +659,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` varchar(12) character set utf8 collate utf8_bin NOT NULL, `a` varchar(12) character set utf8 collate utf8_bin NOT NULL,
`b` int(11) NOT NULL, `b` int(11) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
create table t1 ( create table t1 (
...@@ -674,7 +674,7 @@ t1 CREATE TABLE `t1` ( ...@@ -674,7 +674,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) NOT NULL, `b` int(11) NOT NULL,
`a` varchar(12) character set utf8 collate utf8_bin NOT NULL, `a` varchar(12) character set utf8 collate utf8_bin NOT NULL,
`c` bigint(1) NOT NULL default '0', `c` bigint(1) NOT NULL default '0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
create table t1 ( create table t1 (
...@@ -687,7 +687,7 @@ t1 CREATE TABLE `t1` ( ...@@ -687,7 +687,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) default NULL, `b` int(11) default NULL,
`a` varchar(12) character set utf8 collate utf8_bin NOT NULL, `a` varchar(12) character set utf8 collate utf8_bin NOT NULL,
`c` bigint(1) NOT NULL default '0', `c` bigint(1) NOT NULL default '0',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
create table t1 ( create table t1 (
...@@ -699,7 +699,7 @@ Table Create Table ...@@ -699,7 +699,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` varchar(12) character set utf8 collate utf8_bin NOT NULL, `a` varchar(12) character set utf8 collate utf8_bin NOT NULL,
`b` int(11) NOT NULL, `b` int(11) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
create table t1 ( create table t1 (
...@@ -711,7 +711,7 @@ Table Create Table ...@@ -711,7 +711,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` varchar(12) character set utf8 collate utf8_bin NOT NULL default '', `a` varchar(12) character set utf8 collate utf8_bin NOT NULL default '',
`b` int(11) NOT NULL, `b` int(11) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2; drop table t1, t2;
create table t1 ( create table t1 (
......
...@@ -122,7 +122,7 @@ Table Create Table ...@@ -122,7 +122,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`recid` int(11) NOT NULL auto_increment, `recid` int(11) NOT NULL auto_increment,
`dyninfo` text, `dyninfo` text,
PRIMARY KEY (`recid`) PRIMARY KEY (`recid`)
) ENGINE=MyISAM DEFAULT CHARSET=tis620 ) ENGINE=MyISAM DEFAULT CHARSET=tis620
INSERT INTO t1 VALUES (1,'color=\"STB,NPG\"\r\nengine=\"J30A13\"\r\nframe=\"MRHCG1640YP4\"\r\ngrade=\"V6\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CG164YEN\"\r\ntype=\"VT6\"\r\n'); INSERT INTO t1 VALUES (1,'color=\"STB,NPG\"\r\nengine=\"J30A13\"\r\nframe=\"MRHCG1640YP4\"\r\ngrade=\"V6\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CG164YEN\"\r\ntype=\"VT6\"\r\n');
INSERT INTO t1 VALUES (2,'color=\"HTM,NPG,DEG,RGS\"\r\nengine=\"F23A5YP1\"\r\nframe=\"MRHCF8640YP3\"\r\ngrade=\"EXi AT\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CF864YE\"\r\ntype=\"EXA\"\r\n'); INSERT INTO t1 VALUES (2,'color=\"HTM,NPG,DEG,RGS\"\r\nengine=\"F23A5YP1\"\r\nframe=\"MRHCF8640YP3\"\r\ngrade=\"EXi AT\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CF864YE\"\r\ntype=\"EXA\"\r\n');
......
...@@ -9,7 +9,7 @@ Table Create Table ...@@ -9,7 +9,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`fid` int(11) NOT NULL auto_increment, `fid` int(11) NOT NULL auto_increment,
`g` geometry NOT NULL, `g` geometry NOT NULL,
PRIMARY KEY (`fid`), PRIMARY KEY (`fid`),
SPATIAL KEY `g` (`g`(32)) SPATIAL KEY `g` (`g`(32))
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (g) VALUES (GeomFromText('LineString(150 150, 150 150)')); INSERT INTO t1 (g) VALUES (GeomFromText('LineString(150 150, 150 150)'));
...@@ -292,7 +292,7 @@ Table Create Table ...@@ -292,7 +292,7 @@ Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`fid` int(11) NOT NULL auto_increment, `fid` int(11) NOT NULL auto_increment,
`g` geometry NOT NULL, `g` geometry NOT NULL,
PRIMARY KEY (`fid`), PRIMARY KEY (`fid`),
SPATIAL KEY `g` (`g`(32)) SPATIAL KEY `g` (`g`(32))
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT count(*) FROM t2; SELECT count(*) FROM t2;
......
...@@ -246,7 +246,7 @@ t1 CREATE TABLE `t1` ( ...@@ -246,7 +246,7 @@ t1 CREATE TABLE `t1` (
`t_cust` varchar(4) NOT NULL, `t_cust` varchar(4) NOT NULL,
`filler1` char(250) default NULL, `filler1` char(250) default NULL,
`filler2` char(250) default NULL, `filler2` char(250) default NULL,
PRIMARY KEY (`t_cpac`,`t_vers`,`t_rele`,`t_cust`), PRIMARY KEY (`t_cpac`,`t_vers`,`t_rele`,`t_cust`),
UNIQUE KEY `IX_4` (`t_cust`,`t_cpac`,`t_vers`,`t_rele`), UNIQUE KEY `IX_4` (`t_cust`,`t_cpac`,`t_vers`,`t_rele`),
KEY `IX_5` (`t_vers`,`t_rele`,`t_cust`) KEY `IX_5` (`t_vers`,`t_rele`,`t_cust`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
......
...@@ -433,7 +433,7 @@ show create table t1; ...@@ -433,7 +433,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0', `a` int(11) NOT NULL default '0',
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
UNIQUE KEY `constraint_1` (`a`), UNIQUE KEY `constraint_1` (`a`),
UNIQUE KEY `key_1` (`a`), UNIQUE KEY `key_1` (`a`),
UNIQUE KEY `key_2` (`a`) UNIQUE KEY `key_2` (`a`)
......
...@@ -1589,7 +1589,7 @@ Table Create Table ...@@ -1589,7 +1589,7 @@ Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL auto_increment, `id` int(11) NOT NULL auto_increment,
`id2` int(11) NOT NULL, `id2` int(11) NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `id` (`id`,`id2`), KEY `id` (`id`,`id2`),
CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
...@@ -1622,7 +1622,7 @@ Table Create Table ...@@ -1622,7 +1622,7 @@ Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL auto_increment, `a` int(11) NOT NULL auto_increment,
`b` int(11) default NULL, `b` int(11) default NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
UNIQUE KEY `b_2` (`b`), UNIQUE KEY `b_2` (`b`),
KEY `b` (`b`), KEY `b` (`b`),
CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`) CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
...@@ -1634,7 +1634,7 @@ Table Create Table ...@@ -1634,7 +1634,7 @@ Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL auto_increment, `a` int(11) NOT NULL auto_increment,
`b` int(11) default NULL, `b` int(11) default NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
UNIQUE KEY `b` (`b`), UNIQUE KEY `b` (`b`),
CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`), CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`),
CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`b`) REFERENCES `t1` (`id`) CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
......
...@@ -416,7 +416,7 @@ t1 CREATE TABLE `t1` ( ...@@ -416,7 +416,7 @@ t1 CREATE TABLE `t1` (
`c2` char(12) NOT NULL default '', `c2` char(12) NOT NULL default '',
`c3` varchar(123) NOT NULL default '', `c3` varchar(123) NOT NULL default '',
`c4` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `c4` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`c2`,`c3`), PRIMARY KEY (`c2`,`c3`),
UNIQUE KEY `i4` (`c4`), UNIQUE KEY `i4` (`c4`),
KEY `c1` (`c1`), KEY `c1` (`c1`),
KEY `i1` (`c1`), KEY `i1` (`c1`),
......
...@@ -265,7 +265,7 @@ Table Create Table ...@@ -265,7 +265,7 @@ Table Create Table
t3 CREATE TABLE `t3` ( t3 CREATE TABLE `t3` (
`incr` int(11) NOT NULL, `incr` int(11) NOT NULL,
`othr` int(11) NOT NULL, `othr` int(11) NOT NULL,
PRIMARY KEY (`incr`) PRIMARY KEY (`incr`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`)
alter table t3 drop primary key; alter table t3 drop primary key;
show create table t3; show create table t3;
...@@ -315,14 +315,14 @@ Table Create Table ...@@ -315,14 +315,14 @@ Table Create Table
t5 CREATE TABLE `t5` ( t5 CREATE TABLE `t5` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` int(11) NOT NULL auto_increment, `b` int(11) NOT NULL auto_increment,
PRIMARY KEY (`a`,`b`) PRIMARY KEY (`a`,`b`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`t1`,`t2`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`t1`,`t2`)
show create table t6; show create table t6;
Table Create Table Table Create Table
t6 CREATE TABLE `t6` ( t6 CREATE TABLE `t6` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` int(11) NOT NULL auto_increment, `b` int(11) NOT NULL auto_increment,
PRIMARY KEY (`a`,`b`) PRIMARY KEY (`a`,`b`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
insert into t1 values (1,NULL),(1,NULL),(1,NULL),(1,NULL); insert into t1 values (1,NULL),(1,NULL),(1,NULL),(1,NULL);
insert into t2 values (2,NULL),(2,NULL),(2,NULL),(2,NULL); insert into t2 values (2,NULL),(2,NULL),(2,NULL),(2,NULL);
......
...@@ -14,7 +14,7 @@ t1 CREATE TABLE `t1` ( ...@@ -14,7 +14,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` int(11) NOT NULL, `b` int(11) NOT NULL,
`c` int(11) NOT NULL, `c` int(11) NOT NULL,
PRIMARY KEY (`a`,`b`) PRIMARY KEY (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a)
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
......
...@@ -25,7 +25,7 @@ t1 CREATE TABLE `t1` ( ...@@ -25,7 +25,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` int(11) NOT NULL, `b` int(11) NOT NULL,
`c` int(11) NOT NULL, `c` int(11) NOT NULL,
PRIMARY KEY (`a`,`b`) PRIMARY KEY (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION x1 VALUES LESS THAN (5) TABLESPACE = ts1 ENGINE = MyISAM, PARTITION x2 VALUES LESS THAN (10) TABLESPACE = ts2 ENGINE = MyISAM, PARTITION x3 VALUES LESS THAN MAXVALUE TABLESPACE = ts3 ENGINE = MyISAM) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION x1 VALUES LESS THAN (5) TABLESPACE = ts1 ENGINE = MyISAM, PARTITION x2 VALUES LESS THAN (10) TABLESPACE = ts2 ENGINE = MyISAM, PARTITION x3 VALUES LESS THAN MAXVALUE TABLESPACE = ts3 ENGINE = MyISAM)
ALTER TABLE t1 ALTER TABLE t1
partition by range (a) partition by range (a)
...@@ -45,7 +45,7 @@ t1 CREATE TABLE `t1` ( ...@@ -45,7 +45,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` int(11) NOT NULL, `b` int(11) NOT NULL,
`c` int(11) NOT NULL, `c` int(11) NOT NULL,
PRIMARY KEY (`a`,`b`) PRIMARY KEY (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION x1 VALUES LESS THAN (5) TABLESPACE = ts1 ENGINE = MyISAM, PARTITION x2 VALUES LESS THAN (10) TABLESPACE = ts2 ENGINE = MyISAM, PARTITION x3 VALUES LESS THAN MAXVALUE TABLESPACE = ts3 ENGINE = MyISAM) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION x1 VALUES LESS THAN (5) TABLESPACE = ts1 ENGINE = MyISAM, PARTITION x2 VALUES LESS THAN (10) TABLESPACE = ts2 ENGINE = MyISAM, PARTITION x3 VALUES LESS THAN MAXVALUE TABLESPACE = ts3 ENGINE = MyISAM)
drop table if exists t1; drop table if exists t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
...@@ -142,7 +142,7 @@ t1 CREATE TABLE `t1` ( ...@@ -142,7 +142,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` int(11) NOT NULL, `b` int(11) NOT NULL,
`c` int(11) NOT NULL, `c` int(11) NOT NULL,
PRIMARY KEY (`a`,`b`) PRIMARY KEY (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a+b) (PARTITION x1 VALUES LESS THAN (1) (SUBPARTITION x11 ENGINE = MyISAM, SUBPARTITION x12 ENGINE = MyISAM), PARTITION x2 VALUES LESS THAN (5) (SUBPARTITION x21 ENGINE = MyISAM, SUBPARTITION x22 ENGINE = MyISAM)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a+b) (PARTITION x1 VALUES LESS THAN (1) (SUBPARTITION x11 ENGINE = MyISAM, SUBPARTITION x12 ENGINE = MyISAM), PARTITION x2 VALUES LESS THAN (5) (SUBPARTITION x21 ENGINE = MyISAM, SUBPARTITION x22 ENGINE = MyISAM))
ALTER TABLE t1 ADD COLUMN d int; ALTER TABLE t1 ADD COLUMN d int;
show create table t1; show create table t1;
...@@ -152,7 +152,7 @@ t1 CREATE TABLE `t1` ( ...@@ -152,7 +152,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) NOT NULL, `b` int(11) NOT NULL,
`c` int(11) NOT NULL, `c` int(11) NOT NULL,
`d` int(11) default NULL, `d` int(11) default NULL,
PRIMARY KEY (`a`,`b`) PRIMARY KEY (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a+b) (PARTITION x1 VALUES LESS THAN (1) (SUBPARTITION x11 ENGINE = MyISAM, SUBPARTITION x12 ENGINE = MyISAM), PARTITION x2 VALUES LESS THAN (5) (SUBPARTITION x21 ENGINE = MyISAM, SUBPARTITION x22 ENGINE = MyISAM)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a+b) (PARTITION x1 VALUES LESS THAN (1) (SUBPARTITION x11 ENGINE = MyISAM, SUBPARTITION x12 ENGINE = MyISAM), PARTITION x2 VALUES LESS THAN (5) (SUBPARTITION x21 ENGINE = MyISAM, SUBPARTITION x22 ENGINE = MyISAM))
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
......
...@@ -35,7 +35,7 @@ Table Create Table ...@@ -35,7 +35,7 @@ Table Create Table
t3 CREATE TABLE `t3` ( t3 CREATE TABLE `t3` (
`id` int(11) NOT NULL auto_increment, `id` int(11) NOT NULL auto_increment,
`created` datetime default NULL, `created` datetime default NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
show create table t5; show create table t5;
Table Create Table Table Create Table
......
...@@ -24,7 +24,7 @@ t1 CREATE TABLE `t1` ( ...@@ -24,7 +24,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 engine=myisam; alter table t1 engine=myisam;
show create table t1; show create table t1;
...@@ -39,7 +39,7 @@ t1 CREATE TABLE `t1` ( ...@@ -39,7 +39,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14");
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
...@@ -73,7 +73,7 @@ t1 CREATE TABLE `t1` ( ...@@ -73,7 +73,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14");
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
...@@ -107,7 +107,7 @@ t1 CREATE TABLE `t1` ( ...@@ -107,7 +107,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1 ) ENGINE=MEMORY DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14");
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
...@@ -141,7 +141,7 @@ t1 CREATE TABLE `t1` ( ...@@ -141,7 +141,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1 ) ENGINE=MEMORY DEFAULT CHARSET=latin1
alter table t1 engine=myisam; alter table t1 engine=myisam;
show create table t1; show create table t1;
...@@ -156,7 +156,7 @@ t1 CREATE TABLE `t1` ( ...@@ -156,7 +156,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14");
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
...@@ -190,7 +190,7 @@ t1 CREATE TABLE `t1` ( ...@@ -190,7 +190,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14");
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
...@@ -224,7 +224,7 @@ t1 CREATE TABLE `t1` ( ...@@ -224,7 +224,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1 ) ENGINE=MEMORY DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14");
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
...@@ -258,7 +258,7 @@ t1 CREATE TABLE `t1` ( ...@@ -258,7 +258,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 engine=myisam; alter table t1 engine=myisam;
show create table t1; show create table t1;
...@@ -273,7 +273,7 @@ t1 CREATE TABLE `t1` ( ...@@ -273,7 +273,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14");
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
...@@ -307,7 +307,7 @@ t1 CREATE TABLE `t1` ( ...@@ -307,7 +307,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14");
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
...@@ -341,7 +341,7 @@ t1 CREATE TABLE `t1` ( ...@@ -341,7 +341,7 @@ t1 CREATE TABLE `t1` (
`total` bigint(20) unsigned default NULL, `total` bigint(20) unsigned default NULL,
`y` year(4) default NULL, `y` year(4) default NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1 ) ENGINE=MEMORY DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14");
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
......
...@@ -141,7 +141,7 @@ show create table t1; ...@@ -141,7 +141,7 @@ show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
flush tables; flush tables;
...@@ -248,7 +248,7 @@ t1 CREATE TABLE `t1` ( ...@@ -248,7 +248,7 @@ t1 CREATE TABLE `t1` (
`type_blob` blob, `type_blob` blob,
`type_medium_blob` mediumblob, `type_medium_blob` mediumblob,
`type_long_blob` longblob, `type_long_blob` longblob,
PRIMARY KEY (`type_tiny`), PRIMARY KEY (`type_tiny`),
KEY `type_short` (`type_short`) KEY `type_short` (`type_short`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=100 AVG_ROW_LENGTH=10 PACK_KEYS=1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED COMMENT='test' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=100 AVG_ROW_LENGTH=10 PACK_KEYS=1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED COMMENT='test'
insert into t1 (type_timestamp) values ("2003-02-07 10:00:01"); insert into t1 (type_timestamp) values ("2003-02-07 10:00:01");
...@@ -549,7 +549,7 @@ Table Create Table ...@@ -549,7 +549,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL, `c1` int(11) NOT NULL,
`c2` int(11) NOT NULL, `c2` int(11) NOT NULL,
PRIMARY KEY USING HASH (`c1`), PRIMARY KEY USING HASH (`c1`),
KEY `c2` USING BTREE (`c2`) KEY `c2` USING BTREE (`c2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1; DROP TABLE t1;
......
...@@ -17,7 +17,7 @@ t1 CREATE TABLE `t1` ( ...@@ -17,7 +17,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL auto_increment, `a` int(11) NOT NULL auto_increment,
`pseudo` varchar(35) character set latin2 NOT NULL default '', `pseudo` varchar(35) character set latin2 NOT NULL default '',
`email` varchar(60) character set latin2 NOT NULL default '', `email` varchar(60) character set latin2 NOT NULL default '',
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
UNIQUE KEY `email` USING BTREE (`email`) UNIQUE KEY `email` USING BTREE (`email`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC ) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
set @@sql_mode="ansi_quotes"; set @@sql_mode="ansi_quotes";
...@@ -30,7 +30,7 @@ t1 CREATE TABLE "t1" ( ...@@ -30,7 +30,7 @@ t1 CREATE TABLE "t1" (
"a" int(11) NOT NULL auto_increment, "a" int(11) NOT NULL auto_increment,
"pseudo" varchar(35) character set latin2 NOT NULL default '', "pseudo" varchar(35) character set latin2 NOT NULL default '',
"email" varchar(60) character set latin2 NOT NULL default '', "email" varchar(60) character set latin2 NOT NULL default '',
PRIMARY KEY ("a"), PRIMARY KEY ("a"),
UNIQUE KEY "email" USING BTREE ("email") UNIQUE KEY "email" USING BTREE ("email")
) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC ) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
set @@sql_mode="no_table_options"; set @@sql_mode="no_table_options";
...@@ -43,7 +43,7 @@ t1 CREATE TABLE `t1` ( ...@@ -43,7 +43,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL auto_increment, `a` int(11) NOT NULL auto_increment,
`pseudo` varchar(35) character set latin2 NOT NULL default '', `pseudo` varchar(35) character set latin2 NOT NULL default '',
`email` varchar(60) character set latin2 NOT NULL default '', `email` varchar(60) character set latin2 NOT NULL default '',
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
UNIQUE KEY `email` USING BTREE (`email`) UNIQUE KEY `email` USING BTREE (`email`)
) )
set @@sql_mode="no_key_options"; set @@sql_mode="no_key_options";
...@@ -56,7 +56,7 @@ t1 CREATE TABLE `t1` ( ...@@ -56,7 +56,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL auto_increment, `a` int(11) NOT NULL auto_increment,
`pseudo` varchar(35) character set latin2 NOT NULL default '', `pseudo` varchar(35) character set latin2 NOT NULL default '',
`email` varchar(60) character set latin2 NOT NULL default '', `email` varchar(60) character set latin2 NOT NULL default '',
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
UNIQUE KEY `email` (`email`) UNIQUE KEY `email` (`email`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC ) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
set @@sql_mode="no_field_options,mysql323,mysql40"; set @@sql_mode="no_field_options,mysql323,mysql40";
...@@ -69,7 +69,7 @@ t1 CREATE TABLE `t1` ( ...@@ -69,7 +69,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`pseudo` varchar(35) NOT NULL default '', `pseudo` varchar(35) NOT NULL default '',
`email` varchar(60) NOT NULL default '', `email` varchar(60) NOT NULL default '',
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
UNIQUE KEY `email` (`email`) UNIQUE KEY `email` (`email`)
) TYPE=HEAP ROW_FORMAT=DYNAMIC ) TYPE=HEAP ROW_FORMAT=DYNAMIC
set sql_mode="postgresql,oracle,mssql,db2,maxdb"; set sql_mode="postgresql,oracle,mssql,db2,maxdb";
...@@ -82,7 +82,7 @@ t1 CREATE TABLE "t1" ( ...@@ -82,7 +82,7 @@ t1 CREATE TABLE "t1" (
"a" int(11) NOT NULL, "a" int(11) NOT NULL,
"pseudo" varchar(35) character set latin2 NOT NULL default '', "pseudo" varchar(35) character set latin2 NOT NULL default '',
"email" varchar(60) character set latin2 NOT NULL default '', "email" varchar(60) character set latin2 NOT NULL default '',
PRIMARY KEY ("a"), PRIMARY KEY ("a"),
UNIQUE KEY "email" ("email") UNIQUE KEY "email" ("email")
) )
drop table t1; drop table t1;
...@@ -150,7 +150,7 @@ Table Create Table ...@@ -150,7 +150,7 @@ Table Create Table
t1 CREATE TABLE "t1" ( t1 CREATE TABLE "t1" (
"f1" int(11) NOT NULL auto_increment, "f1" int(11) NOT NULL auto_increment,
"f2" timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, "f2" timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY ("f1") PRIMARY KEY ("f1")
) )
set session sql_mode=no_field_options; set session sql_mode=no_field_options;
show create table t1; show create table t1;
...@@ -158,7 +158,7 @@ Table Create Table ...@@ -158,7 +158,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL, `f1` int(11) NOT NULL,
`f2` timestamp NOT NULL default CURRENT_TIMESTAMP, `f2` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`f1`) PRIMARY KEY (`f1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=''; SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='';
......
...@@ -1268,7 +1268,7 @@ Table Create Table ...@@ -1268,7 +1268,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0', `a` int(11) NOT NULL default '0',
`b` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `b` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
create table t1(a int, b timestamp default 20050102030405); create table t1(a int, b timestamp default 20050102030405);
...@@ -1278,7 +1278,7 @@ Table Create Table ...@@ -1278,7 +1278,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0', `a` int(11) NOT NULL default '0',
`b` timestamp NOT NULL default '2005-01-02 03:04:05', `b` timestamp NOT NULL default '2005-01-02 03:04:05',
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
set @@sql_mode='traditional'; set @@sql_mode='traditional';
......
...@@ -39,7 +39,7 @@ t9 CREATE TABLE `t9` ( ...@@ -39,7 +39,7 @@ t9 CREATE TABLE `t9` (
`a` int(11) NOT NULL auto_increment, `a` int(11) NOT NULL auto_increment,
`b` char(16) NOT NULL, `b` char(16) NOT NULL,
`c` int(11) NOT NULL, `c` int(11) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
alter table t9 rename t8, add column d int not null; alter table t9 rename t8, add column d int not null;
alter table t8 rename t7; alter table t8 rename t7;
...@@ -52,7 +52,7 @@ t9 CREATE TABLE `t9` ( ...@@ -52,7 +52,7 @@ t9 CREATE TABLE `t9` (
`b` char(16) NOT NULL, `b` char(16) NOT NULL,
`c` int(11) NOT NULL, `c` int(11) NOT NULL,
`d` int(11) NOT NULL, `d` int(11) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
Got one of the listed errors Got one of the listed errors
Got one of the listed errors Got one of the listed errors
...@@ -70,7 +70,7 @@ t9 CREATE TABLE `t9` ( ...@@ -70,7 +70,7 @@ t9 CREATE TABLE `t9` (
`b` char(16) NOT NULL, `b` char(16) NOT NULL,
`c` int(11) NOT NULL, `c` int(11) NOT NULL,
`d` int(11) NOT NULL, `d` int(11) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
drop database mysqltest; drop database mysqltest;
create table t1 (a int not null) engine=myisam; create table t1 (a int not null) engine=myisam;
......
...@@ -46,7 +46,8 @@ db CREATE TABLE `db` ( ...@@ -46,7 +46,8 @@ db CREATE TABLE `db` (
`Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
`Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
`Event_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Event_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
PRIMARY KEY (`Host`,`Db`,`User`), `Trigger_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`) KEY `User` (`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
show create table host; show create table host;
...@@ -71,7 +72,8 @@ host CREATE TABLE `host` ( ...@@ -71,7 +72,8 @@ host CREATE TABLE `host` (
`Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
`Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
`Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
PRIMARY KEY (`Host`,`Db`) `Trigger_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
PRIMARY KEY (`Host`,`Db`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'
show create table user; show create table user;
Table Create Table Table Create Table
...@@ -106,6 +108,7 @@ user CREATE TABLE `user` ( ...@@ -106,6 +108,7 @@ user CREATE TABLE `user` (
`Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
`Create_user_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Create_user_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
`Event_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Event_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
`Trigger_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') character set utf8 NOT NULL default '', `ssl_type` enum('','ANY','X509','SPECIFIED') character set utf8 NOT NULL default '',
`ssl_cipher` blob NOT NULL, `ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL, `x509_issuer` blob NOT NULL,
...@@ -114,7 +117,7 @@ user CREATE TABLE `user` ( ...@@ -114,7 +117,7 @@ user CREATE TABLE `user` (
`max_updates` int(11) unsigned NOT NULL default '0', `max_updates` int(11) unsigned NOT NULL default '0',
`max_connections` int(11) unsigned NOT NULL default '0', `max_connections` int(11) unsigned NOT NULL default '0',
`max_user_connections` int(11) unsigned NOT NULL default '0', `max_user_connections` int(11) unsigned NOT NULL default '0',
PRIMARY KEY (`Host`,`User`) PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func; show create table func;
Table Create Table Table Create Table
...@@ -123,7 +126,7 @@ func CREATE TABLE `func` ( ...@@ -123,7 +126,7 @@ func CREATE TABLE `func` (
`ret` tinyint(1) NOT NULL default '0', `ret` tinyint(1) NOT NULL default '0',
`dl` char(128) collate utf8_bin NOT NULL default '', `dl` char(128) collate utf8_bin NOT NULL default '',
`type` enum('function','aggregate') character set utf8 NOT NULL, `type` enum('function','aggregate') character set utf8 NOT NULL,
PRIMARY KEY (`name`) PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'
show create table tables_priv; show create table tables_priv;
Table Create Table Table Create Table
...@@ -134,9 +137,9 @@ tables_priv CREATE TABLE `tables_priv` ( ...@@ -134,9 +137,9 @@ tables_priv CREATE TABLE `tables_priv` (
`Table_name` char(64) collate utf8_bin NOT NULL default '', `Table_name` char(64) collate utf8_bin NOT NULL default '',
`Grantor` char(77) collate utf8_bin NOT NULL default '', `Grantor` char(77) collate utf8_bin NOT NULL default '',
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') character set utf8 NOT NULL default '', `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') character set utf8 NOT NULL default '',
`Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '', `Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`) KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'
show create table columns_priv; show create table columns_priv;
...@@ -149,7 +152,7 @@ columns_priv CREATE TABLE `columns_priv` ( ...@@ -149,7 +152,7 @@ columns_priv CREATE TABLE `columns_priv` (
`Column_name` char(64) collate utf8_bin NOT NULL default '', `Column_name` char(64) collate utf8_bin NOT NULL default '',
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '', `Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
show create table procs_priv; show create table procs_priv;
Table Create Table Table Create Table
...@@ -162,7 +165,7 @@ procs_priv CREATE TABLE `procs_priv` ( ...@@ -162,7 +165,7 @@ procs_priv CREATE TABLE `procs_priv` (
`Grantor` char(77) collate utf8_bin NOT NULL default '', `Grantor` char(77) collate utf8_bin NOT NULL default '',
`Proc_priv` set('Execute','Alter Routine','Grant') character set utf8 NOT NULL default '', `Proc_priv` set('Execute','Alter Routine','Grant') character set utf8 NOT NULL default '',
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`) KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
show create table proc; show create table proc;
...@@ -184,7 +187,7 @@ proc CREATE TABLE `proc` ( ...@@ -184,7 +187,7 @@ proc CREATE TABLE `proc` (
`modified` timestamp NOT NULL default '0000-00-00 00:00:00', `modified` timestamp NOT NULL default '0000-00-00 00:00:00',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL default '', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL default '',
`comment` char(64) character set utf8 collate utf8_bin NOT NULL default '', `comment` char(64) character set utf8 collate utf8_bin NOT NULL default '',
PRIMARY KEY (`db`,`name`,`type`) PRIMARY KEY (`db`,`name`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures'
show create table event; show create table event;
Table Create Table Table Create Table
...@@ -205,7 +208,7 @@ event CREATE TABLE `event` ( ...@@ -205,7 +208,7 @@ event CREATE TABLE `event` (
`on_completion` enum('DROP','PRESERVE') NOT NULL default 'DROP', `on_completion` enum('DROP','PRESERVE') NOT NULL default 'DROP',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL default '', `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL default '',
`comment` char(64) character set utf8 collate utf8_bin NOT NULL default '', `comment` char(64) character set utf8 collate utf8_bin NOT NULL default '',
PRIMARY KEY (`definer`,`db`,`name`) PRIMARY KEY (`definer`,`db`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'
show create table general_log; show create table general_log;
Table Create Table Table Create Table
......
...@@ -714,7 +714,7 @@ t1 CREATE TABLE `t1` ( ...@@ -714,7 +714,7 @@ t1 CREATE TABLE `t1` (
`c` tinyblob NOT NULL, `c` tinyblob NOT NULL,
`d` int(11) NOT NULL default '0', `d` int(11) NOT NULL default '0',
`e` int(11) default NULL, `e` int(11) default NULL,
PRIMARY KEY (`a`,`b`,`c`(255),`d`), PRIMARY KEY (`a`,`b`,`c`(255),`d`),
KEY `a` (`a`,`b`,`d`,`e`) KEY `a` (`a`,`b`,`d`,`e`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1; drop table t1;
......
...@@ -1058,15 +1058,20 @@ store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, ...@@ -1058,15 +1058,20 @@ store_create_info(THD *thd, TABLE_LIST *table_list, String *packet,
if (i == primary_key && !strcmp(key_info->name, primary_key_name)) if (i == primary_key && !strcmp(key_info->name, primary_key_name))
{ {
found_primary=1; found_primary=1;
packet->append(STRING_WITH_LEN("PRIMARY ")); /*
No space at end, because a space will be added after where the
identifier would go, but that is not added for primary key.
*/
packet->append(STRING_WITH_LEN("PRIMARY KEY"));
} }
else if (key_info->flags & HA_NOSAME) else if (key_info->flags & HA_NOSAME)
packet->append(STRING_WITH_LEN("UNIQUE ")); packet->append(STRING_WITH_LEN("UNIQUE KEY "));
else if (key_info->flags & HA_FULLTEXT) else if (key_info->flags & HA_FULLTEXT)
packet->append(STRING_WITH_LEN("FULLTEXT ")); packet->append(STRING_WITH_LEN("FULLTEXT KEY "));
else if (key_info->flags & HA_SPATIAL) else if (key_info->flags & HA_SPATIAL)
packet->append(STRING_WITH_LEN("SPATIAL ")); packet->append(STRING_WITH_LEN("SPATIAL KEY "));
packet->append(STRING_WITH_LEN("KEY ")); else
packet->append(STRING_WITH_LEN("KEY "));
if (!found_primary) if (!found_primary)
append_identifier(thd, packet, key_info->name, strlen(key_info->name)); append_identifier(thd, packet, key_info->name, strlen(key_info->name));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment