Commit 40b3222b authored by msvensson@neptunus.(none)'s avatar msvensson@neptunus.(none)

Merge neptunus.(none):/home/msvensson/mysql/bug10460/my51-bug10460

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1
parents b56857d1 c4b1fb68
......@@ -468,25 +468,25 @@ delete from t1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) character set koi8r default NULL
`a` char(10) CHARACTER SET koi8r DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 DEFAULT CHARACTER SET latin1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) character set koi8r default NULL
`a` char(10) CHARACTER SET koi8r DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 CONVERT TO CHARACTER SET latin1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) default NULL
`a` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 DEFAULT CHARACTER SET cp1251;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) character set latin1 default NULL
`a` char(10) CHARACTER SET latin1 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=cp1251
drop table t1;
create table t1 (myblob longblob,mytext longtext)
......@@ -495,14 +495,14 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`myblob` longblob,
`mytext` longtext collate latin1_general_cs
`mytext` longtext COLLATE latin1_general_cs
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs
alter table t1 character set latin2;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`myblob` longblob,
`mytext` longtext character set latin1 collate latin1_general_cs
`mytext` longtext CHARACTER SET latin1 COLLATE latin1_general_cs
) ENGINE=MyISAM DEFAULT CHARSET=latin2
drop table t1;
CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE);
......@@ -511,7 +511,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` int(11) default NULL,
`b` int(11) DEFAULT NULL,
UNIQUE KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t1 DROP PRIMARY KEY;
......
......@@ -36,16 +36,16 @@ create table t2 select * from t1 where 0=1 procedure analyse();
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`Field_name` varbinary(255) NOT NULL default '',
`Min_value` varbinary(255) default NULL,
`Max_value` varbinary(255) default NULL,
`Min_length` bigint(11) NOT NULL default '0',
`Max_length` bigint(11) NOT NULL default '0',
`Empties_or_zeros` bigint(11) NOT NULL default '0',
`Nulls` bigint(11) NOT NULL default '0',
`Avg_value_or_avg_length` varbinary(255) NOT NULL default '',
`Std` varbinary(255) default NULL,
`Optimal_fieldtype` varbinary(64) NOT NULL default ''
`Field_name` varbinary(255) NOT NULL DEFAULT '',
`Min_value` varbinary(255) DEFAULT NULL,
`Max_value` varbinary(255) DEFAULT NULL,
`Min_length` bigint(11) NOT NULL DEFAULT '0',
`Max_length` bigint(11) NOT NULL DEFAULT '0',
`Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0',
`Nulls` bigint(11) NOT NULL DEFAULT '0',
`Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '',
`Std` varbinary(255) DEFAULT NULL,
`Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1 where 0=1 procedure analyse();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
......@@ -55,16 +55,16 @@ create table t2 select * from t1 where 0=1 procedure analyse();
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`Field_name` varbinary(255) NOT NULL default '',
`Min_value` varbinary(255) default NULL,
`Max_value` varbinary(255) default NULL,
`Min_length` bigint(11) NOT NULL default '0',
`Max_length` bigint(11) NOT NULL default '0',
`Empties_or_zeros` bigint(11) NOT NULL default '0',
`Nulls` bigint(11) NOT NULL default '0',
`Avg_value_or_avg_length` varbinary(255) NOT NULL default '',
`Std` varbinary(255) default NULL,
`Optimal_fieldtype` varbinary(64) NOT NULL default ''
`Field_name` varbinary(255) NOT NULL DEFAULT '',
`Min_value` varbinary(255) DEFAULT NULL,
`Max_value` varbinary(255) DEFAULT NULL,
`Min_length` bigint(11) NOT NULL DEFAULT '0',
`Max_length` bigint(11) NOT NULL DEFAULT '0',
`Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0',
`Nulls` bigint(11) NOT NULL DEFAULT '0',
`Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '',
`Std` varbinary(255) DEFAULT NULL,
`Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t2;
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
......@@ -78,16 +78,16 @@ create table t2 select * from t1 where 0=1 procedure analyse();
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`Field_name` varbinary(255) NOT NULL default '',
`Min_value` varbinary(255) default NULL,
`Max_value` varbinary(255) default NULL,
`Min_length` bigint(11) NOT NULL default '0',
`Max_length` bigint(11) NOT NULL default '0',
`Empties_or_zeros` bigint(11) NOT NULL default '0',
`Nulls` bigint(11) NOT NULL default '0',
`Avg_value_or_avg_length` varbinary(255) NOT NULL default '',
`Std` varbinary(255) default NULL,
`Optimal_fieldtype` varbinary(64) NOT NULL default ''
`Field_name` varbinary(255) NOT NULL DEFAULT '',
`Min_value` varbinary(255) DEFAULT NULL,
`Max_value` varbinary(255) DEFAULT NULL,
`Min_length` bigint(11) NOT NULL DEFAULT '0',
`Max_length` bigint(11) NOT NULL DEFAULT '0',
`Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0',
`Nulls` bigint(11) NOT NULL DEFAULT '0',
`Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '',
`Std` varbinary(255) DEFAULT NULL,
`Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t2;
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
......
......@@ -12340,12 +12340,12 @@ ALTER TABLE t2 DROP COLUMN fld6;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`auto` int(11) default NULL,
`fld1` int(6) unsigned zerofill NOT NULL default '000000',
`companynr` tinyint(2) unsigned zerofill NOT NULL default '00',
`fld3` char(30) NOT NULL default '',
`fld4` char(35) NOT NULL default '',
`fld5` char(35) NOT NULL default ''
`auto` int(11) DEFAULT NULL,
`fld1` int(6) unsigned zerofill NOT NULL DEFAULT '000000',
`companynr` tinyint(2) unsigned zerofill NOT NULL DEFAULT '00',
`fld3` char(30) NOT NULL DEFAULT '',
`fld4` char(35) NOT NULL DEFAULT '',
`fld5` char(35) NOT NULL DEFAULT ''
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
SELECT * FROM t2;
auto fld1 companynr fld3 fld4 fld5
......
......@@ -6,8 +6,8 @@ b bit(64)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk1` int(11) NOT NULL auto_increment,
`b` bit(64) default NULL,
`pk1` int(11) NOT NULL AUTO_INCREMENT,
`b` bit(64) DEFAULT NULL,
PRIMARY KEY (`pk1`)
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
insert into t1 values
......
......@@ -11,8 +11,8 @@ CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY);
SHOW CREATE TABLE gis_point;
Table Create Table
gis_point CREATE TABLE `gis_point` (
`fid` int(11) NOT NULL auto_increment,
`g` point default NULL,
`fid` int(11) NOT NULL AUTO_INCREMENT,
`g` point DEFAULT NULL,
PRIMARY KEY (`fid`)
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
SHOW FIELDS FROM gis_point;
......
......@@ -1366,40 +1366,40 @@ concat('*',v,'*',c,'*',t,'*')
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
create table t2 like t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
create table t3 select * from t1;
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
alter table t1 modify c varchar(10);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` varchar(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` text
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
alter table t1 modify v char(10);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` char(10) default NULL,
`c` varchar(10) default NULL,
`v` char(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` text
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
alter table t1 modify t varchar(10);
......@@ -1408,9 +1408,9 @@ Note 1265 Data truncated for column 't' at row 2
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` char(10) default NULL,
`c` varchar(10) default NULL,
`t` varchar(10) default NULL
`v` char(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` varchar(10) DEFAULT NULL
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
select concat('*',v,'*',c,'*',t,'*') from t1;
concat('*',v,'*',c,'*',t,'*')
......@@ -1421,8 +1421,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10)));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `v` (`v`),
KEY `c` (`c`),
......@@ -1640,8 +1640,8 @@ alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(300) default NULL,
`c` char(10) default NULL,
`v` varchar(300) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
......@@ -1720,8 +1720,8 @@ alter table t1 drop key v, add key v (v(30));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(300) default NULL,
`c` char(10) default NULL,
`v` varchar(300) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
......@@ -1800,8 +1800,8 @@ alter table t1 modify v varchar(600), drop key v, add key v (v);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(600) default NULL,
`c` char(10) default NULL,
`v` varchar(600) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
......@@ -1878,8 +1878,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `v` (`v`(5)),
KEY `c` (`c`(5)),
......@@ -1890,15 +1890,15 @@ create table t1 (v char(10) character set utf8);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` char(10) character set utf8 default NULL
`v` char(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
drop table t1;
create table t1 (v varchar(10), c char(10)) row_format=fixed;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED
insert into t1 values('a','a'),('a ','a ');
select concat('*',v,'*',c,'*') from t1;
......@@ -1940,7 +1940,7 @@ Note 1246 Converting column 'v' from VARCHAR to TEXT
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` mediumtext character set utf8
`v` mediumtext CHARACTER SET utf8
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
drop table t1;
set storage_engine=MyISAM;
......
......@@ -11,8 +11,8 @@ CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY);
SHOW CREATE TABLE gis_point;
Table Create Table
gis_point CREATE TABLE `gis_point` (
`fid` int(11) NOT NULL auto_increment,
`g` point default NULL,
`fid` int(11) NOT NULL AUTO_INCREMENT
`g` point DEFAULT NULL,
PRIMARY KEY (`fid`)
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
SHOW FIELDS FROM gis_point;
......
......@@ -174,14 +174,14 @@ create table t1 select 1 as 'a';
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(1) NOT NULL default '0'
`a` bigint(1) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 select 9223372036854775809 as 'a';
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(19) unsigned NOT NULL default '0'
`a` bigint(19) unsigned NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1;
a
......
......@@ -138,7 +138,7 @@ create table t1 (a binary);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` binary(1) default NULL
`a` binary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (col1 binary(4));
......
......@@ -99,18 +99,18 @@ CASE WHEN 1 THEN 0.1e1 else '1' END AS c12
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(1) character set latin1 collate latin1_danish_ci NOT NULL default '',
`c2` varchar(1) character set latin1 collate latin1_danish_ci NOT NULL default '',
`c3` varbinary(1) NOT NULL default '',
`c4` varbinary(1) NOT NULL default '',
`c5` varbinary(3) NOT NULL default '',
`c6` varbinary(3) NOT NULL default '',
`c7` decimal(2,1) NOT NULL default '0.0',
`c8` decimal(2,1) NOT NULL default '0.0',
`c9` decimal(2,1) default NULL,
`c10` double NOT NULL default '0',
`c11` double NOT NULL default '0',
`c12` varbinary(5) NOT NULL default ''
`c1` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL DEFAULT '',
`c2` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL DEFAULT '',
`c3` varbinary(1) NOT NULL DEFAULT '',
`c4` varbinary(1) NOT NULL DEFAULT '',
`c5` varbinary(3) NOT NULL DEFAULT '',
`c6` varbinary(3) NOT NULL DEFAULT '',
`c7` decimal(2,1) NOT NULL DEFAULT '0.0',
`c8` decimal(2,1) NOT NULL DEFAULT '0.0',
`c9` decimal(2,1) DEFAULT NULL,
`c10` double NOT NULL DEFAULT '0',
`c11` double NOT NULL DEFAULT '0',
`c12` varbinary(5) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SELECT CASE
......@@ -151,13 +151,13 @@ Note 1003 select coalesce(1) AS `COALESCE(1)`,coalesce(1.0) AS `COALESCE(1.0)`,c
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`COALESCE(1)` int(1) NOT NULL default '0',
`COALESCE(1.0)` decimal(2,1) unsigned NOT NULL default '0.0',
`COALESCE('a')` varchar(1) NOT NULL default '',
`COALESCE(1,1.0)` decimal(2,1) NOT NULL default '0.0',
`COALESCE(1,'1')` varbinary(1) NOT NULL default '',
`COALESCE(1.1,'1')` varbinary(3) NOT NULL default '',
`COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) character set latin1 collate latin1_bin NOT NULL default ''
`COALESCE(1)` int(1) NOT NULL DEFAULT '0',
`COALESCE(1.0)` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
`COALESCE('a')` varchar(1) NOT NULL DEFAULT '',
`COALESCE(1,1.0)` decimal(2,1) NOT NULL DEFAULT '0.0',
`COALESCE(1,'1')` varbinary(1) NOT NULL DEFAULT '',
`COALESCE(1.1,'1')` varbinary(3) NOT NULL DEFAULT '',
`COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SELECT 'case+union+test'
......
......@@ -157,7 +157,7 @@ create table t1 select cast(_koi8r'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`t` varchar(4) character set cp1251 NOT NULL default ''
`t` varchar(4) CHARACTER SET cp1251 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select
......@@ -191,11 +191,11 @@ ab a ab a 6100
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varbinary(2) NOT NULL default '',
`c2` varbinary(2) NOT NULL default '',
`c3` varbinary(2) NOT NULL default '',
`c4` varbinary(2) NOT NULL default '',
`c5` varbinary(2) NOT NULL default ''
`c1` varbinary(2) NOT NULL DEFAULT '',
`c2` varbinary(2) NOT NULL DEFAULT '',
`c3` varbinary(2) NOT NULL DEFAULT '',
`c4` varbinary(2) NOT NULL DEFAULT '',
`c5` varbinary(2) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select
......@@ -224,11 +224,11 @@ c1 c2 c3 c4 c5
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(2) character set utf8 NOT NULL default '',
`c2` varchar(2) character set utf8 NOT NULL default '',
`c3` varchar(2) character set utf8 NOT NULL default '',
`c4` varchar(2) character set utf8 NOT NULL default '',
`c5` varchar(2) character set utf8 NOT NULL default ''
`c1` varchar(2) CHARACTER SET utf8 NOT NULL DEFAULT '',
`c2` varchar(2) CHARACTER SET utf8 NOT NULL DEFAULT '',
`c3` varchar(2) CHARACTER SET utf8 NOT NULL DEFAULT '',
`c4` varchar(2) CHARACTER SET utf8 NOT NULL DEFAULT '',
`c5` varchar(2) CHARACTER SET utf8 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a binary(4), b char(4) character set koi8r);
......
......@@ -21,7 +21,7 @@ alter table t1 add constraint constraint_2 unique key_2(a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL,
`a` int(11) DEFAULT NULL,
UNIQUE KEY `constraint_1` (`a`),
UNIQUE KEY `key_1` (`a`),
UNIQUE KEY `key_2` (`a`)
......
......@@ -44,7 +44,7 @@ create table `a/a` (a int);
show create table `a/a`;
Table Create Table
a/a CREATE TABLE `a/a` (
`a` int(11) default NULL
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t1 like `a/a`;
drop table `a/a`;
......@@ -174,7 +174,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` int(11) default NULL,
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`),
KEY `b` (`b`),
KEY `b_2` (`b`),
......@@ -311,7 +311,7 @@ show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`id` int(11) NOT NULL,
`name` char(20) default NULL
`name` char(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t3;
id name
......@@ -334,7 +334,7 @@ show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`id` int(11) NOT NULL,
`name` char(20) default NULL
`name` char(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t3;
id name
......@@ -346,14 +346,14 @@ show create table t3;
Table Create Table
t3 CREATE TEMPORARY TABLE `t3` (
`id` int(11) NOT NULL,
`name` char(20) default NULL
`name` char(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t2 like t3;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL,
`name` char(20) default NULL
`name` char(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t2;
id name
......@@ -447,21 +447,21 @@ create table t2 select ifnull(a,a), ifnull(b,b), ifnull(c,c), ifnull(d,d), ifnul
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`ifnull(a,a)` tinyint(4) default NULL,
`ifnull(b,b)` smallint(6) default NULL,
`ifnull(c,c)` mediumint(8) default NULL,
`ifnull(d,d)` int(11) default NULL,
`ifnull(e,e)` bigint(20) default NULL,
`ifnull(f,f)` float(24,2) default NULL,
`ifnull(g,g)` double(53,3) default NULL,
`ifnull(h,h)` decimal(5,4) default NULL,
`ifnull(i,i)` year(4) default NULL,
`ifnull(j,j)` date default NULL,
`ifnull(k,k)` datetime NOT NULL default '0000-00-00 00:00:00',
`ifnull(l,l)` datetime default NULL,
`ifnull(m,m)` varchar(1) default NULL,
`ifnull(n,n)` varchar(3) default NULL,
`ifnull(o,o)` varchar(10) default NULL
`ifnull(a,a)` tinyint(4) DEFAULT NULL,
`ifnull(b,b)` smallint(6) DEFAULT NULL,
`ifnull(c,c)` mediumint(8) DEFAULT NULL,
`ifnull(d,d)` int(11) DEFAULT NULL,
`ifnull(e,e)` bigint(20) DEFAULT NULL,
`ifnull(f,f)` float(24,2) DEFAULT NULL,
`ifnull(g,g)` double(53,3) DEFAULT NULL,
`ifnull(h,h)` decimal(5,4) DEFAULT NULL,
`ifnull(i,i)` year(4) DEFAULT NULL,
`ifnull(j,j)` date DEFAULT NULL,
`ifnull(k,k)` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ifnull(l,l)` datetime DEFAULT NULL,
`ifnull(m,m)` varchar(1) DEFAULT NULL,
`ifnull(n,n)` varchar(3) DEFAULT NULL,
`ifnull(o,o)` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1,t2;
create table t1(str varchar(10) default 'def',strnull varchar(10),intg int default '10',rel double default '3.14');
......@@ -526,14 +526,14 @@ create table t1 (`primary` int, index(`primary`));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`primary` int(11) default NULL,
`primary` int(11) DEFAULT NULL,
KEY `primary_2` (`primary`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t2 (`PRIMARY` int, index(`PRIMARY`));
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`PRIMARY` int(11) default NULL,
`PRIMARY` int(11) DEFAULT NULL,
KEY `PRIMARY_2` (`PRIMARY`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t3 (a int);
......@@ -546,7 +546,7 @@ alter table t4 add index(`primary`);
show create table t4;
Table Create Table
t4 CREATE TABLE `t4` (
`primary` int(11) default NULL,
`primary` int(11) DEFAULT NULL,
KEY `primary_2` (`primary`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t5 (`PRIMARY` int);
......@@ -554,7 +554,7 @@ alter table t5 add index(`PRIMARY`);
show create table t5;
Table Create Table
t5 CREATE TABLE `t5` (
`PRIMARY` int(11) default NULL,
`PRIMARY` int(11) DEFAULT NULL,
KEY `PRIMARY_2` (`PRIMARY`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2, t3, t4, t5;
......@@ -642,7 +642,7 @@ primary key (a)
show create table t1;
Table Create Table
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`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
......@@ -657,7 +657,7 @@ b int not null, primary key (a)
show create table t1;
Table Create Table
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,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......@@ -672,8 +672,8 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) NOT NULL,
`a` varchar(12) character set utf8 collate utf8_bin NOT NULL,
`c` bigint(1) NOT NULL default '0',
`a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`c` bigint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
......@@ -684,9 +684,9 @@ b int null, primary key (a)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) default NULL,
`a` varchar(12) character set utf8 collate utf8_bin NOT NULL,
`c` bigint(1) NOT NULL default '0',
`b` int(11) DEFAULT NULL,
`a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`c` bigint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
......@@ -697,7 +697,7 @@ b int not null, primary key (a)
show create table t1;
Table Create Table
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,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......@@ -709,7 +709,7 @@ b int not null, primary key (a)
show create table t1;
Table Create Table
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,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......@@ -745,29 +745,29 @@ select a1,a2 from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) default '3',
`b` int(11) default '3',
`a1` int(11) default NULL,
`a2` int(11) default NULL
`a` int(11) DEFAULT '3',
`b` int(11) DEFAULT '3',
`a1` int(11) DEFAULT NULL,
`a2` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (i int) engine=myisam max_rows=100000000000;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295
alter table t1 max_rows=100;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=100
alter table t1 max_rows=100000000000;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295
drop table t1;
create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb
......
......@@ -494,7 +494,7 @@ latin1_f CHAR(32) CHARACTER SET latin1 COLLATE latin1_bin;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`latin1_f` char(32) character set latin1 collate latin1_bin default NULL
`latin1_f` char(32) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW FIELDS FROM t1;
Field Type Null Key Default Extra
......@@ -503,7 +503,7 @@ ALTER TABLE t1 CHARACTER SET latin1 COLLATE latin1_bin;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`latin1_f` char(32) collate latin1_bin default NULL
`latin1_f` char(32) COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin
SHOW FIELDS FROM t1;
Field Type Null Key Default Extra
......
......@@ -12,7 +12,7 @@ CREATE TABLE mysqltest2.t1 (a char(10));
SHOW CREATE TABLE mysqltest2.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) default NULL
`a` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin5
DROP TABLE mysqltest2.t1;
ALTER DATABASE mysqltest2 DEFAULT CHARACTER SET latin7;
......@@ -20,7 +20,7 @@ CREATE TABLE mysqltest2.t1 (a char(10));
SHOW CREATE TABLE mysqltest2.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) default NULL
`a` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin7
DROP DATABASE mysqltest2;
CREATE DATABASE mysqltest2 CHARACTER SET latin2;
......@@ -28,7 +28,7 @@ CREATE TABLE mysqltest2.t1 (a char(10));
SHOW CREATE TABLE mysqltest2.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) default NULL
`a` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin2
DROP DATABASE mysqltest2;
USE mysqltest1;
......@@ -36,14 +36,14 @@ CREATE TABLE t1 (a char(10));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) default NULL
`a` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=cp1251
DROP TABLE t1;
CREATE TABLE t1 (a char(10)) DEFAULT CHARACTER SET latin1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) default NULL
`a` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a char(10))
......@@ -51,7 +51,7 @@ DEFAULT CHARACTER SET latin1 COLLATE latin1_german1_ci;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) collate latin1_german1_ci default NULL
`a` char(10) COLLATE latin1_german1_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci
DROP TABLE t1;
create table t1 (a char) character set latin1 character set latin2;
......
......@@ -224,8 +224,8 @@ create table t1 (word varchar(255) not null, word2 varchar(255) not null default
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`word` varchar(255) collate latin1_german2_ci NOT NULL,
`word2` varchar(255) collate latin1_german2_ci NOT NULL default '',
`word` varchar(255) COLLATE latin1_german2_ci NOT NULL,
`word2` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
KEY `word` (`word`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci
insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae');
......@@ -299,7 +299,7 @@ s1 CHAR(5) CHARACTER SET latin1 COLLATE latin1_german2_ci
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`s1` char(5) collate latin1_german2_ci default NULL
`s1` char(5) COLLATE latin1_german2_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci
INSERT INTO t1 VALUES ('');
INSERT INTO t1 VALUES ('ue');
......
......@@ -3,17 +3,17 @@ CREATE TABLE t1 SELECT _utf8'test' as c1, _utf8'тест' as c2;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(4) character set utf8 NOT NULL default '',
`c2` varchar(4) character set utf8 NOT NULL default ''
`c1` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT '',
`c2` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DELETE FROM t1;
ALTER TABLE t1 ADD c3 CHAR(4) CHARACTER SET utf8;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(4) character set utf8 NOT NULL default '',
`c2` varchar(4) character set utf8 NOT NULL default '',
`c3` char(4) character set utf8 default NULL
`c1` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT '',
`c2` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT '',
`c3` char(4) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd');
Warnings:
......@@ -28,7 +28,7 @@ CREATE TABLE t1 (a CHAR(4) CHARACTER SET utf8, KEY key_a(a(3)));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(4) character set utf8 default NULL,
`a` char(4) CHARACTER SET utf8 DEFAULT NULL,
KEY `key_a` (`a`(3))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW KEYS FROM t1;
......@@ -38,7 +38,7 @@ ALTER TABLE t1 CHANGE a a CHAR(4);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(4) default NULL,
`a` char(4) DEFAULT NULL,
KEY `key_a` (`a`(3))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW KEYS FROM t1;
......@@ -48,7 +48,7 @@ ALTER TABLE t1 CHANGE a a CHAR(4) CHARACTER SET utf8;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(4) character set utf8 default NULL,
`a` char(4) CHARACTER SET utf8 DEFAULT NULL,
KEY `key_a` (`a`(3))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW KEYS FROM t1;
......
......@@ -6,7 +6,7 @@ CREATE TABLE t2 (a CHAR(10) CHARACTER SET utf8);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) character set cp1251 default NULL
`a` char(10) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT a FROM t1;
a
......@@ -30,7 +30,7 @@ CREATE TABLE t2 (a TEXT CHARACTER SET utf8);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` text character set cp1251
`a` text CHARACTER SET cp1251
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT HEX(a) FROM t1;
HEX(a)
......@@ -50,7 +50,7 @@ Tables_in_test
SHOW CREATE TABLE ;
Table Create Table
CREATE TABLE `` (
`` char(32) character set koi8r NOT NULL COMMENT ' '
`` char(32) CHARACTER SET koi8r NOT NULL COMMENT ' '
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=' '
SHOW FIELDS FROM ;
Field Type Null Key Default Extra
......@@ -62,7 +62,7 @@ Tables_in_test
SHOW CREATE TABLE ;
Table Create Table
CREATE TABLE `` (
`` char(32) character set koi8r NOT NULL COMMENT ' '
`` char(32) CHARACTER SET koi8r NOT NULL COMMENT ' '
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=' '
SHOW FIELDS FROM ;
Field Type Null Key Default Extra
......@@ -74,7 +74,7 @@ Tables_in_test
SHOW CREATE TABLE таблица;
Table Create Table
таблица CREATE TABLE `таблица` (
`поле` char(32) character set koi8r NOT NULL COMMENT 'комментарий поля'
`поле` char(32) CHARACTER SET koi8r NOT NULL COMMENT 'комментарий поля'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='комментарий таблицы'
SHOW FIELDS FROM таблица;
Field Type Null Key Default Extra
......@@ -117,13 +117,13 @@ CREATE TABLE `тест` (`тест` int);
SHOW CREATE TABLE `тест`;
Table Create Table
тест CREATE TABLE `тест` (
`тест` int(11) default NULL
`тест` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SET NAMES utf8;
SHOW CREATE TABLE `тест`;
Table Create Table
тест CREATE TABLE `тест` (
`тест` int(11) default NULL
`тест` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE `тест`;
SET NAMES binary;
......@@ -141,8 +141,8 @@ CREATE TABLE t1 (`
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`` char(128) default '',
`1` enum('1','2') default '2'
`` char(128) DEFAULT '',
`1` enum('1','2') DEFAULT '2'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
......@@ -152,8 +152,8 @@ SET NAMES binary;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`ä` char(128) default 'ä',
`ä1` enum('ä1','ä2') default 'ä2'
`ä` char(128) DEFAULT 'ä',
`ä1` enum('ä1','ä2') DEFAULT 'ä2'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
......
......@@ -51,7 +51,7 @@ create table t1(c enum(0x9353,0x9373) character set sjis);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` enum('鉄','都') character set sjis default NULL
`c` enum('鉄','都') CHARACTER SET sjis DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0x9353);
insert into t1 values (0x9373);
......
......@@ -120,7 +120,7 @@ PRIMARY KEY (recid)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`recid` int(11) NOT NULL auto_increment,
`recid` int(11) NOT NULL AUTO_INCREMENT,
`dyninfo` text,
PRIMARY KEY (`recid`)
) ENGINE=MyISAM DEFAULT CHARSET=tis620
......
......@@ -74,8 +74,8 @@ RPAD(_ucs2 X'0420',10,_ucs2 X'0421') r;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`l` varchar(10) character set ucs2 NOT NULL default '',
`r` varchar(10) character set ucs2 NOT NULL default ''
`l` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '',
`r` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
create table t2(f1 Char(30));
......@@ -523,7 +523,7 @@ create table t1 (a enum('x','y','z') character set ucs2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('x','y','z') character set ucs2 default NULL
`a` enum('x','y','z') CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('x');
insert into t1 values ('y');
......@@ -537,7 +537,7 @@ alter table t1 change a a enum('x','y','z','d','e','
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('x','y','z','d','e','','','') character set ucs2 default NULL
`a` enum('x','y','z','d','e','','','') CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('D');
insert into t1 values ('E ');
......@@ -559,7 +559,7 @@ create table t1 (a set ('x','y','z','
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` set('x','y','z','','','') character set ucs2 default NULL
`a` set('x','y','z','','','') CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('x');
insert into t1 values ('y');
......
......@@ -118,8 +118,8 @@ b enum('
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(1) NOT NULL default '',
`b` enum('あ','い') default NULL
`a` char(1) NOT NULL DEFAULT '',
`b` enum('あ','い') DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=ujis
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
......
......@@ -124,7 +124,7 @@ create table t1 select date_format("2004-01-19 10:10:10", "%Y-%m-%d");
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varbinary(10) default NULL
`date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1;
date_format("2004-01-19 10:10:10", "%Y-%m-%d")
......@@ -275,7 +275,7 @@ create table t1 (a enum('aaaa','проба') character set utf8);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` enum('aaaa','проба') character set utf8 default NULL
`a` enum('aaaa','проба') CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('проба');
select * from t1;
......@@ -285,7 +285,7 @@ create table t2 select ifnull(a,a) from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`ifnull(a,a)` varchar(5) character set utf8 default NULL
`ifnull(a,a)` varchar(5) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t2;
ifnull(a,a)
......@@ -411,7 +411,7 @@ unique key a using hash (c(1))
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) character set utf8 default NULL,
`c` char(10) CHARACTER SET utf8 DEFAULT NULL,
UNIQUE KEY `a` USING HASH (`c`(1))
) ENGINE=MEMORY DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
......@@ -447,7 +447,7 @@ unique key a using btree (c(1))
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) character set utf8 default NULL,
`c` char(10) CHARACTER SET utf8 DEFAULT NULL,
UNIQUE KEY `a` USING BTREE (`c`(1))
) ENGINE=MEMORY DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
......@@ -569,7 +569,7 @@ unique key a using hash (c(1))
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) character set utf8 collate utf8_bin default NULL,
`c` char(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
UNIQUE KEY `a` USING HASH (`c`(1))
) ENGINE=MEMORY DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
......@@ -605,7 +605,7 @@ unique key a using btree (c(1))
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` char(10) character set utf8 collate utf8_bin default NULL,
`c` char(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
UNIQUE KEY `a` USING BTREE (`c`(1))
) ENGINE=MEMORY DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
......@@ -809,8 +809,8 @@ create table t2 select concat(a,_utf8'') as a, concat(b,_utf8'')as b from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varchar(5) character set utf8 NOT NULL default '',
`b` varchar(15) character set utf8 NOT NULL default ''
`a` varchar(5) CHARACTER SET utf8 NOT NULL DEFAULT '',
`b` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2;
drop table t1;
......
......@@ -67,9 +67,9 @@ ENGINE=MyISAM DEFAULT CHARACTER SET = latin1 COLLATE latin1_bin;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varchar(30) collate latin1_bin NOT NULL default ' ',
`b` varchar(1) collate latin1_bin NOT NULL default ' ',
`c` varchar(4) collate latin1_bin NOT NULL default '0000',
`a` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ',
`b` varchar(1) COLLATE latin1_bin NOT NULL DEFAULT ' ',
`c` varchar(4) COLLATE latin1_bin NOT NULL DEFAULT '0000',
`d` tinyblob,
`e` tinyblob,
`f` tinyblob,
......@@ -83,17 +83,17 @@ t2 CREATE TABLE `t2` (
`n` tinyblob,
`o` tinyblob,
`p` tinyblob,
`q` varchar(30) collate latin1_bin NOT NULL default ' ',
`r` varchar(30) collate latin1_bin NOT NULL default ' ',
`q` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ',
`r` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ',
`s` tinyblob,
`t` varchar(4) collate latin1_bin NOT NULL default ' ',
`u` varchar(1) collate latin1_bin NOT NULL default ' ',
`v` varchar(30) collate latin1_bin NOT NULL default ' ',
`w` varchar(30) collate latin1_bin NOT NULL default ' ',
`t` varchar(4) COLLATE latin1_bin NOT NULL DEFAULT ' ',
`u` varchar(1) COLLATE latin1_bin NOT NULL DEFAULT ' ',
`v` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ',
`w` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ',
`x` tinyblob,
`y` varchar(5) collate latin1_bin NOT NULL default ' ',
`z` varchar(20) collate latin1_bin NOT NULL default ' ',
`a1` varchar(30) collate latin1_bin NOT NULL default ' ',
`y` varchar(5) COLLATE latin1_bin NOT NULL DEFAULT ' ',
`z` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT ' ',
`a1` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ',
`b1` tinyblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin
INSERT into t2 (b) values ('1');
......
......@@ -236,22 +236,22 @@ ALTER TABLE mysql.event MODIFY db char(20) character set utf8 collate utf8_bin d
SHOW CREATE TABLE mysql.event;
Table Create Table
event CREATE TABLE `event` (
`db` char(20) character set utf8 collate utf8_bin NOT NULL default '',
`name` char(64) character set utf8 collate utf8_bin NOT NULL default '',
`db` char(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`name` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`body` longblob NOT NULL,
`definer` char(77) character set utf8 collate utf8_bin NOT NULL default '',
`execute_at` datetime default NULL,
`interval_value` int(11) default NULL,
`interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') default NULL,
`created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`modified` timestamp NOT NULL default '0000-00-00 00:00:00',
`last_executed` datetime default NULL,
`starts` datetime default NULL,
`ends` datetime default NULL,
`status` enum('ENABLED','DISABLED') NOT NULL default 'ENABLED',
`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 '',
`comment` char(64) character set utf8 collate utf8_bin NOT NULL default '',
`definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`execute_at` datetime DEFAULT NULL,
`interval_value` int(11) DEFAULT NULL,
`interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_executed` datetime DEFAULT NULL,
`starts` datetime DEFAULT NULL,
`ends` datetime DEFAULT NULL,
`status` enum('ENABLED','DISABLED') NOT NULL DEFAULT 'ENABLED',
`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 '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
PRIMARY KEY (`definer`,`db`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
......
......@@ -78,7 +78,7 @@ SHOW CREATE TABLE federated.t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
`name` varchar(32) NOT NULL DEFAULT ''
) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'
INSERT INTO federated.t2 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t2 (id, name) VALUES (2, 'fee');
......
......@@ -248,7 +248,7 @@ t2 1 tix 1 inhalt NULL NULL NULL NULL YES FULLTEXT
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`ticket` int(11) default NULL,
`ticket` int(11) DEFAULT NULL,
`inhalt` text,
KEY `tig` (`ticket`),
FULLTEXT KEY `tix` (`inhalt`)
......@@ -454,7 +454,7 @@ CREATE TABLE t1 (a VARCHAR(10000), FULLTEXT(a));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10000) default NULL,
`a` varchar(10000) DEFAULT NULL,
FULLTEXT KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
......
......@@ -458,7 +458,7 @@ create table t2 select group_concat(a) as a from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varchar(400) character set cp1250 default NULL
`a` varchar(400) CHARACTER SET cp1250 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select collation(group_concat(a,_koi8r'test')) from t1;
collation(group_concat(a,_koi8r'test'))
......
......@@ -677,21 +677,21 @@ latin2 2 latin2 2
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(1) character set latin2 default NULL
`a` char(1) CHARACTER SET latin2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t2 select max(a),min(a) from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`max(a)` char(1) character set latin2 default NULL,
`min(a)` char(1) character set latin2 default NULL
`max(a)` char(1) CHARACTER SET latin2 DEFAULT NULL,
`min(a)` char(1) CHARACTER SET latin2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2;
create table t2 select concat(a) from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`concat(a)` varchar(1) character set latin2 default NULL
`concat(a)` varchar(1) CHARACTER SET latin2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2,t1;
create table t1 (a int);
......@@ -780,7 +780,7 @@ create table t2 select MAX(b) from t1 group by a;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`MAX(b)` datetime default NULL
`MAX(b)` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1(f1 datetime);
......
......@@ -156,7 +156,7 @@ create table t1 select round(1, 6);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`round(1, 6)` decimal(7,6) NOT NULL default '0.000000'
`round(1, 6)` decimal(7,6) NOT NULL DEFAULT '0.000000'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1;
round(1, 6)
......
......@@ -55,8 +55,8 @@ create table t1 as select uuid(), length(uuid());
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`uuid()` varchar(36) character set utf8 NOT NULL default '',
`length(uuid())` int(10) NOT NULL default '0'
`uuid()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT '',
`length(uuid())` int(10) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a timestamp default '2005-05-05 01:01:01',
......
......@@ -719,37 +719,37 @@ Warning 1265 Data truncated for column 'format(130,10)' at row 1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`bin(130)` varchar(64) NOT NULL default '',
`oct(130)` varchar(64) NOT NULL default '',
`conv(130,16,10)` varchar(64) NOT NULL default '',
`hex(130)` varchar(6) NOT NULL default '',
`char(130)` varbinary(1) NOT NULL default '',
`format(130,10)` varchar(4) NOT NULL default '',
`left(_latin2'a',1)` varchar(1) character set latin2 NOT NULL default '',
`right(_latin2'a',1)` varchar(1) character set latin2 NOT NULL default '',
`lcase(_latin2'a')` varchar(1) character set latin2 NOT NULL default '',
`ucase(_latin2'a')` varchar(1) character set latin2 NOT NULL default '',
`substring(_latin2'a',1,1)` varchar(1) character set latin2 NOT NULL default '',
`concat(_latin2'a',_latin2'b')` varchar(2) character set latin2 NOT NULL default '',
`lpad(_latin2'a',4,_latin2'b')` varchar(4) character set latin2 NOT NULL default '',
`rpad(_latin2'a',4,_latin2'b')` varchar(4) character set latin2 NOT NULL default '',
`concat_ws(_latin2'a',_latin2'b')` varchar(1) character set latin2 NOT NULL default '',
`make_set(255,_latin2'a',_latin2'b',_latin2'c')` varchar(5) character set latin2 NOT NULL default '',
`export_set(255,_latin2'y',_latin2'n',_latin2' ')` varchar(127) character set latin2 NOT NULL default '',
`trim(_latin2' a ')` varchar(3) character set latin2 NOT NULL default '',
`ltrim(_latin2' a ')` varchar(3) character set latin2 NOT NULL default '',
`rtrim(_latin2' a ')` varchar(3) character set latin2 NOT NULL default '',
`trim(LEADING _latin2' ' FROM _latin2' a ')` varchar(3) character set latin2 NOT NULL default '',
`trim(TRAILING _latin2' ' FROM _latin2' a ')` varchar(3) character set latin2 NOT NULL default '',
`trim(BOTH _latin2' ' FROM _latin2' a ')` varchar(3) character set latin2 NOT NULL default '',
`repeat(_latin2'a',10)` varchar(10) character set latin2 NOT NULL default '',
`reverse(_latin2'ab')` varchar(2) character set latin2 NOT NULL default '',
`quote(_latin2'ab')` varchar(6) character set latin2 NOT NULL default '',
`soundex(_latin2'ab')` varchar(4) character set latin2 NOT NULL default '',
`substring(_latin2'ab',1)` varchar(2) character set latin2 NOT NULL default '',
`insert(_latin2'abcd',2,3,_latin2'ef')` varchar(6) character set latin2 NOT NULL default '',
`replace(_latin2'abcd',_latin2'b',_latin2'B')` varchar(4) character set latin2 NOT NULL default '',
`encode('abcd','ab')` varbinary(4) NOT NULL default ''
`bin(130)` varchar(64) NOT NULL DEFAULT '',
`oct(130)` varchar(64) NOT NULL DEFAULT '',
`conv(130,16,10)` varchar(64) NOT NULL DEFAULT '',
`hex(130)` varchar(6) NOT NULL DEFAULT '',
`char(130)` varbinary(1) NOT NULL DEFAULT '',
`format(130,10)` varchar(4) NOT NULL DEFAULT '',
`left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
`right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
`lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
`ucase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
`substring(_latin2'a',1,1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
`concat(_latin2'a',_latin2'b')` varchar(2) CHARACTER SET latin2 NOT NULL DEFAULT '',
`lpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '',
`rpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '',
`concat_ws(_latin2'a',_latin2'b')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
`make_set(255,_latin2'a',_latin2'b',_latin2'c')` varchar(5) CHARACTER SET latin2 NOT NULL DEFAULT '',
`export_set(255,_latin2'y',_latin2'n',_latin2' ')` varchar(127) CHARACTER SET latin2 NOT NULL DEFAULT '',
`trim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
`ltrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
`rtrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
`trim(LEADING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
`trim(TRAILING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
`trim(BOTH _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
`repeat(_latin2'a',10)` varchar(10) CHARACTER SET latin2 NOT NULL DEFAULT '',
`reverse(_latin2'ab')` varchar(2) CHARACTER SET latin2 NOT NULL DEFAULT '',
`quote(_latin2'ab')` varchar(6) CHARACTER SET latin2 NOT NULL DEFAULT '',
`soundex(_latin2'ab')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '',
`substring(_latin2'ab',1)` varchar(2) CHARACTER SET latin2 NOT NULL DEFAULT '',
`insert(_latin2'abcd',2,3,_latin2'ef')` varchar(6) CHARACTER SET latin2 NOT NULL DEFAULT '',
`replace(_latin2'abcd',_latin2'b',_latin2'B')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '',
`encode('abcd','ab')` varbinary(4) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a char character set latin2);
......
......@@ -46,9 +46,9 @@ create table t1 (version char(60)) select database(), user(), version() as 'vers
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`database()` varchar(34) character set utf8 default NULL,
`user()` varchar(77) character set utf8 NOT NULL default '',
`version` char(60) default NULL
`database()` varchar(34) CHARACTER SET utf8 DEFAULT NULL,
`user()` varchar(77) CHARACTER SET utf8 NOT NULL DEFAULT '',
`version` char(60) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select charset(charset(_utf8'a')), charset(collation(_utf8'a'));
......@@ -61,8 +61,8 @@ create table t1 select charset(_utf8'a'), collation(_utf8'a');
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`charset(_utf8'a')` varchar(64) character set utf8 NOT NULL default '',
`collation(_utf8'a')` varchar(64) character set utf8 NOT NULL default ''
`charset(_utf8'a')` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
`collation(_utf8'a')` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select TRUE,FALSE,NULL;
......
......@@ -7,7 +7,7 @@ SPATIAL KEY(g)
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`fid` int(11) NOT NULL auto_increment,
`fid` int(11) NOT NULL AUTO_INCREMENT,
`g` geometry NOT NULL,
PRIMARY KEY (`fid`),
SPATIAL KEY `g` (`g`(32))
......@@ -290,7 +290,7 @@ ALTER TABLE t2 ADD SPATIAL KEY(g);
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`fid` int(11) NOT NULL auto_increment,
`fid` int(11) NOT NULL AUTO_INCREMENT,
`g` geometry NOT NULL,
PRIMARY KEY (`fid`),
SPATIAL KEY `g` (`g`(32))
......
......@@ -263,41 +263,41 @@ concat('*',v,'*',c,'*',t,'*')
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`t` varchar(50) default NULL
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` varchar(50) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
create table t2 like t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`t` varchar(50) default NULL
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` varchar(50) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
create table t3 select * from t1;
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`t` varchar(50) default NULL
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` varchar(50) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
alter table t1 modify c varchar(10);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` varchar(10) default NULL,
`t` varchar(50) default NULL
`v` varchar(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` varchar(50) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
alter table t1 modify v char(10);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` char(10) default NULL,
`c` varchar(10) default NULL,
`t` varchar(50) default NULL
`v` char(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` varchar(50) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
alter table t1 modify t varchar(10);
Warnings:
......@@ -305,9 +305,9 @@ Warning 1265 Data truncated for column 't' at row 2
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` char(10) default NULL,
`c` varchar(10) default NULL,
`t` varchar(10) default NULL
`v` char(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` varchar(10) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
select concat('*',v,'*',c,'*',t,'*') from t1;
concat('*',v,'*',c,'*',t,'*')
......@@ -318,9 +318,9 @@ create table t1 (v varchar(10), c char(10), t varchar(50), key(v), key(c), key(t
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`t` varchar(50) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` varchar(50) DEFAULT NULL,
KEY `v` (`v`),
KEY `c` (`c`),
KEY `t` (`t`(10))
......@@ -553,9 +553,9 @@ create table t1 (v varchar(10), c char(10), t varchar(50), key using btree (v),
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`t` varchar(50) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` varchar(50) DEFAULT NULL,
KEY `v` USING BTREE (`v`),
KEY `c` USING BTREE (`c`),
KEY `t` USING BTREE (`t`(10))
......@@ -644,9 +644,9 @@ create table t1 (v varchar(10), c char(10), t varchar(50), key(v(5)), key(c(5)),
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`t` varchar(50) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` varchar(50) DEFAULT NULL,
KEY `v` (`v`(5)),
KEY `c` (`c`(5)),
KEY `t` (`t`(5))
......@@ -656,7 +656,7 @@ create table t1 (v varchar(65530), key(v(10)));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(65530) default NULL,
`v` varchar(65530) DEFAULT NULL,
KEY `v` (`v`(10))
) ENGINE=MEMORY DEFAULT CHARSET=latin1
insert into t1 values(repeat('a',65530));
......
......@@ -244,8 +244,8 @@ t1 CREATE TABLE `t1` (
`t_vers` varchar(4) NOT NULL,
`t_rele` varchar(2) NOT NULL,
`t_cust` varchar(4) NOT NULL,
`filler1` char(250) default NULL,
`filler2` char(250) default NULL,
`filler1` char(250) DEFAULT NULL,
`filler2` char(250) DEFAULT NULL,
PRIMARY KEY (`t_cpac`,`t_vers`,`t_rele`,`t_cust`),
UNIQUE KEY `IX_4` (`t_cust`,`t_cpac`,`t_vers`,`t_rele`),
KEY `IX_5` (`t_vers`,`t_rele`,`t_cust`)
......
......@@ -433,7 +433,7 @@ alter table t1 add constraint constraint_2 unique key_2(a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
`a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`),
UNIQUE KEY `constraint_1` (`a`),
UNIQUE KEY `key_1` (`a`),
......@@ -506,19 +506,19 @@ drop table t1;
SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets;
Table Create Table
CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` (
`CHARACTER_SET_NAME` varchar(64) NOT NULL default '',
`DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '',
`DESCRIPTION` varchar(60) NOT NULL default '',
`MAXLEN` bigint(3) NOT NULL default '0'
`CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '',
`DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '',
`DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
`MAXLEN` bigint(3) NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8
set names latin2;
SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets;
Table Create Table
CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` (
`CHARACTER_SET_NAME` varchar(64) NOT NULL default '',
`DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '',
`DESCRIPTION` varchar(60) NOT NULL default '',
`MAXLEN` bigint(3) NOT NULL default '0'
`CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '',
`DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '',
`DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
`MAXLEN` bigint(3) NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8
set names latin1;
create table t1 select * from information_schema.CHARACTER_SETS
......@@ -530,10 +530,10 @@ alter table t1 default character set utf8;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`CHARACTER_SET_NAME` varchar(64) NOT NULL default '',
`DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '',
`DESCRIPTION` varchar(60) NOT NULL default '',
`MAXLEN` bigint(3) NOT NULL default '0'
`CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '',
`DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '',
`DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
`MAXLEN` bigint(3) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8
drop table t1;
create view v1 as select * from information_schema.TABLES;
......
......@@ -856,7 +856,7 @@ create table t1 (a char(20), index (a(5))) engine=innodb;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(20) default NULL,
`a` char(20) DEFAULT NULL,
KEY `a` (`a`(5))
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
......@@ -1587,7 +1587,7 @@ create table t2 (id int(11) not null auto_increment, id2 int(11) not null, const
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL auto_increment,
`id` int(11) NOT NULL AUTO_INCREMENT,
`id2` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`,`id2`),
......@@ -1598,7 +1598,7 @@ create table t2 (id int(11) not null auto_increment, id2 int(11) not null, const
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL auto_increment,
`id` int(11) NOT NULL AUTO_INCREMENT,
`id2` int(11) NOT NULL,
KEY `t1_id_fk` (`id`),
CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
......@@ -1607,7 +1607,7 @@ alter table t2 add index id_test (id), add index id_test2 (id,id2);
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL auto_increment,
`id` int(11) NOT NULL AUTO_INCREMENT,
`id2` int(11) NOT NULL,
KEY `id_test` (`id`),
KEY `id_test2` (`id`,`id2`),
......@@ -1620,8 +1620,8 @@ create table t2 (a int auto_increment primary key, b int, index(b), foreign key
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL auto_increment,
`b` int(11) default NULL,
`a` int(11) NOT NULL AUTO_INCREMENT,
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`),
UNIQUE KEY `b_2` (`b`),
KEY `b` (`b`),
......@@ -1632,8 +1632,8 @@ create table t2 (a int auto_increment primary key, b int, foreign key (b) refere
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL auto_increment,
`b` int(11) default NULL,
`a` int(11) NOT NULL AUTO_INCREMENT,
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`),
UNIQUE KEY `b` (`b`),
CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`),
......@@ -1843,40 +1843,40 @@ concat('*',v,'*',c,'*',t,'*')
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1
create table t2 like t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1
create table t3 select * from t1;
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 modify c varchar(10);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` varchar(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 modify v char(10);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` char(10) default NULL,
`c` varchar(10) default NULL,
`v` char(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 modify t varchar(10);
......@@ -1885,9 +1885,9 @@ Note 1265 Data truncated for column 't' at row 2
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` char(10) default NULL,
`c` varchar(10) default NULL,
`t` varchar(10) default NULL
`v` char(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
select concat('*',v,'*',c,'*',t,'*') from t1;
concat('*',v,'*',c,'*',t,'*')
......@@ -1898,8 +1898,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10)));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `v` (`v`),
KEY `c` (`c`),
......@@ -2117,8 +2117,8 @@ alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(300) default NULL,
`c` char(10) default NULL,
`v` varchar(300) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
......@@ -2197,8 +2197,8 @@ alter table t1 drop key v, add key v (v(30));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(300) default NULL,
`c` char(10) default NULL,
`v` varchar(300) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
......@@ -2277,8 +2277,8 @@ alter table t1 modify v varchar(600), drop key v, add key v (v);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(600) default NULL,
`c` char(10) default NULL,
`v` varchar(600) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
......@@ -2355,8 +2355,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `v` (`v`(5)),
KEY `c` (`c`(5)),
......@@ -2367,15 +2367,15 @@ create table t1 (v char(10) character set utf8);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` char(10) character set utf8 default NULL
`v` char(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
create table t1 (v varchar(10), c char(10)) row_format=fixed;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED
insert into t1 values('a','a'),('a ','a ');
select concat('*',v,'*',c,'*') from t1;
......@@ -2417,7 +2417,7 @@ Note 1246 Converting column 'v' from VARCHAR to TEXT
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` mediumtext character set utf8
`v` mediumtext CHARACTER SET utf8
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
set storage_engine=MyISAM;
......@@ -2544,8 +2544,8 @@ character set = latin1 engine = innodb;
show create table t9;
Table Create Table
t9 CREATE TABLE `t9` (
`col1` varchar(512) default NULL,
`col2` varchar(512) default NULL,
`col1` varchar(512) DEFAULT NULL,
`col2` varchar(512) DEFAULT NULL,
KEY `col1` (`col1`,`col2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
......@@ -2568,7 +2568,7 @@ Warning 1071 Specified key was too long; max key length is 767 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`col1` varchar(768) default NULL,
`col1` varchar(768) DEFAULT NULL,
KEY `col1` (`col1`(767))
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1, t2, t3, t4;
......
......@@ -11,8 +11,8 @@ CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY);
SHOW CREATE TABLE gis_point;
Table Create Table
gis_point CREATE TABLE `gis_point` (
`fid` int(11) NOT NULL auto_increment,
`g` point default NULL,
`fid` int(11) NOT NULL AUTO_INCREMENT,
`g` point DEFAULT NULL,
PRIMARY KEY (`fid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW FIELDS FROM gis_point;
......
......@@ -242,8 +242,8 @@ create table t1 (c varchar(30) character set utf8, t text character set utf8, un
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` varchar(30) character set utf8 default NULL,
`t` text character set utf8,
`c` varchar(30) CHARACTER SET utf8 DEFAULT NULL,
`t` text CHARACTER SET utf8,
UNIQUE KEY `c` (`c`(2)),
UNIQUE KEY `t` (`t`(3))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......@@ -350,24 +350,24 @@ create table t1 (a varchar(10), b varchar(10), key(a(10),b(10)));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) default NULL,
`b` varchar(10) default NULL,
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
KEY `a` (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 modify b varchar(20);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) default NULL,
`b` varchar(20) default NULL,
`a` varchar(10) DEFAULT NULL,
`b` varchar(20) DEFAULT NULL,
KEY `a` (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 modify a varchar(20);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(20) default NULL,
`b` varchar(20) default NULL,
`a` varchar(20) DEFAULT NULL,
`b` varchar(20) DEFAULT NULL,
KEY `a` (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
......@@ -412,10 +412,10 @@ index (c2, c4));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) default NULL,
`c2` char(12) NOT NULL default '',
`c3` varchar(123) NOT NULL default '',
`c4` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`c1` int(11) DEFAULT NULL,
`c2` char(12) NOT NULL DEFAULT '',
`c3` varchar(123) NOT NULL DEFAULT '',
`c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`c2`,`c3`),
UNIQUE KEY `i4` (`c4`),
KEY `c1` (`c1`),
......@@ -445,10 +445,10 @@ ERROR 42000: Can't DROP 'PRIMARY'; check that column/key exists
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL default '0',
`c2` char(12) NOT NULL default '',
`c3` varchar(123) NOT NULL default '',
`c4` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`c1` int(11) NOT NULL DEFAULT '0',
`c2` char(12) NOT NULL DEFAULT '',
`c3` varchar(123) NOT NULL DEFAULT '',
`c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
KEY `i1` (`c1`),
KEY `i5` (`c1`,`c2`,`c3`,`c4`),
KEY `c1` (`c1`),
......
......@@ -173,7 +173,7 @@ show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`a` int(11) NOT NULL,
`b` char(20) default NULL,
`b` char(20) DEFAULT NULL,
KEY `a` (`a`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`)
create table t4 (a int not null, b char(10), key(a)) engine=MERGE UNION=(t1,t2);
......@@ -191,7 +191,7 @@ show create table t5;
Table Create Table
t5 CREATE TABLE `t5` (
`a` int(11) NOT NULL,
`b` char(20) default NULL,
`b` char(20) DEFAULT NULL,
KEY `a` (`a`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`mysqltest`.`t6`)
alter table t5 engine=myisam;
......@@ -314,14 +314,14 @@ show create table t5;
Table Create Table
t5 CREATE TABLE `t5` (
`a` int(11) NOT NULL,
`b` int(11) NOT NULL auto_increment,
`b` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`a`,`b`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`t1`,`t2`)
show create table t6;
Table Create Table
t6 CREATE TABLE `t6` (
`a` int(11) NOT NULL,
`b` int(11) NOT NULL auto_increment,
`b` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`a`,`b`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
insert into t1 values (1,NULL),(1,NULL),(1,NULL),(1,NULL);
......
......@@ -746,40 +746,40 @@ concat('*',v,'*',c,'*',t,'*')
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t2 like t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t3 select * from t1;
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 modify c varchar(10);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` varchar(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 modify v char(10);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` char(10) default NULL,
`c` varchar(10) default NULL,
`v` char(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 modify t varchar(10);
......@@ -788,9 +788,9 @@ Note 1265 Data truncated for column 't' at row 2
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` char(10) default NULL,
`c` varchar(10) default NULL,
`t` varchar(10) default NULL
`v` char(10) DEFAULT NULL,
`c` varchar(10) DEFAULT NULL,
`t` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select concat('*',v,'*',c,'*',t,'*') from t1;
concat('*',v,'*',c,'*',t,'*')
......@@ -801,8 +801,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10)));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `v` (`v`),
KEY `c` (`c`),
......@@ -1020,8 +1020,8 @@ alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(300) default NULL,
`c` char(10) default NULL,
`v` varchar(300) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
......@@ -1100,8 +1100,8 @@ alter table t1 drop key v, add key v (v(30));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(300) default NULL,
`c` char(10) default NULL,
`v` varchar(300) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
......@@ -1180,8 +1180,8 @@ alter table t1 modify v varchar(600), drop key v, add key v (v);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(600) default NULL,
`c` char(10) default NULL,
`v` varchar(600) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `c` (`c`),
KEY `t` (`t`(10)),
......@@ -1258,8 +1258,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL,
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`t` text,
KEY `v` (`v`(5)),
KEY `c` (`c`(5)),
......@@ -1270,15 +1270,15 @@ create table t1 (v char(10) character set utf8);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` char(10) character set utf8 default NULL
`v` char(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (v varchar(10), c char(10)) row_format=fixed;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` varchar(10) default NULL,
`c` char(10) default NULL
`v` varchar(10) DEFAULT NULL,
`c` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED
insert into t1 values('a','a'),('a ','a ');
select concat('*',v,'*',c,'*') from t1;
......@@ -1320,7 +1320,7 @@ Note 1246 Converting column 'v' from VARCHAR to TEXT
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` mediumtext character set utf8
`v` mediumtext CHARACTER SET utf8
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (v varchar(65535));
......
......@@ -111,8 +111,8 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l
USE `test`;
DROP TABLE IF EXISTS `t1`;
CREATE TABLE `t1` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......@@ -121,8 +121,8 @@ INSERT DELAYED IGNORE INTO `t1` VALUES (1,'first value'),(2,'first value'),(3,'
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
DROP TABLE IF EXISTS `t2`;
CREATE TABLE `t2` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......@@ -131,8 +131,8 @@ INSERT DELAYED IGNORE INTO `t2` VALUES (1,'first value'),(2,'first value'),(3,'
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
DROP TABLE IF EXISTS `t3`;
CREATE TABLE `t3` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1;
......@@ -141,8 +141,8 @@ INSERT DELAYED IGNORE INTO `t3` VALUES (1,'first value'),(2,'first value'),(3,'
/*!40000 ALTER TABLE `t3` ENABLE KEYS */;
DROP TABLE IF EXISTS `t4`;
CREATE TABLE `t4` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1;
......@@ -151,8 +151,8 @@ INSERT DELAYED IGNORE INTO `t4` VALUES (1,'first value'),(2,'first value'),(3,'
/*!40000 ALTER TABLE `t4` ENABLE KEYS */;
DROP TABLE IF EXISTS `t5`;
CREATE TABLE `t5` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1;
......@@ -161,8 +161,8 @@ INSERT DELAYED IGNORE INTO `t5` VALUES (1,'first value'),(2,'first value'),(3,'
/*!40000 ALTER TABLE `t5` ENABLE KEYS */;
DROP TABLE IF EXISTS `t6`;
CREATE TABLE `t6` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
......@@ -196,8 +196,8 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l
USE `test`;
DROP TABLE IF EXISTS `t1`;
CREATE TABLE `t1` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......@@ -206,8 +206,8 @@ INSERT DELAYED INTO `t1` VALUES (1,'first value'),(2,'first value'),(3,'first v
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
DROP TABLE IF EXISTS `t2`;
CREATE TABLE `t2` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......@@ -216,8 +216,8 @@ INSERT DELAYED INTO `t2` VALUES (1,'first value'),(2,'first value'),(3,'first v
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
DROP TABLE IF EXISTS `t3`;
CREATE TABLE `t3` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1;
......@@ -226,8 +226,8 @@ INSERT DELAYED INTO `t3` VALUES (1,'first value'),(2,'first value'),(3,'first v
/*!40000 ALTER TABLE `t3` ENABLE KEYS */;
DROP TABLE IF EXISTS `t4`;
CREATE TABLE `t4` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1;
......@@ -236,8 +236,8 @@ INSERT DELAYED INTO `t4` VALUES (1,'first value'),(2,'first value'),(3,'first v
/*!40000 ALTER TABLE `t4` ENABLE KEYS */;
DROP TABLE IF EXISTS `t5`;
CREATE TABLE `t5` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1;
......@@ -246,8 +246,8 @@ INSERT DELAYED INTO `t5` VALUES (1,'first value'),(2,'first value'),(3,'first v
/*!40000 ALTER TABLE `t5` ENABLE KEYS */;
DROP TABLE IF EXISTS `t6`;
CREATE TABLE `t6` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
......
This diff is collapsed.
......@@ -7,7 +7,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk1` int(11) NOT NULL,
`b` bit(64) default NULL,
`b` bit(64) DEFAULT NULL,
PRIMARY KEY (`pk1`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY ()
insert into t1 values
......
......@@ -11,8 +11,8 @@ CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY);
SHOW CREATE TABLE gis_point;
Table Create Table
gis_point CREATE TABLE `gis_point` (
`fid` int(11) NOT NULL auto_increment,
`g` point default NULL,
`fid` int(11) NOT NULL AUTO_INCREMENT,
`g` point DEFAULT NULL,
PRIMARY KEY (`fid`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY ()
SHOW FIELDS FROM gis_point;
......@@ -473,8 +473,8 @@ CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY);
SHOW CREATE TABLE gis_point;
Table Create Table
gis_point CREATE TABLE `gis_point` (
`fid` int(11) NOT NULL auto_increment,
`g` point default NULL,
`fid` int(11) NOT NULL AUTO_INCREMENT,
`g` point DEFAULT NULL,
PRIMARY KEY (`fid`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY ()
SHOW FIELDS FROM gis_point;
......
......@@ -73,10 +73,10 @@ NDBT_ProgramExit: 0 - OK
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
`b` char(10) character set latin1 collate latin1_bin NOT NULL default '',
`c` int(11) NOT NULL default '0',
`d` int(11) default NULL,
`a` int(11) NOT NULL DEFAULT '0',
`b` char(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
`c` int(11) NOT NULL DEFAULT '0',
`d` int(11) DEFAULT NULL,
PRIMARY KEY USING HASH (`a`,`b`,`c`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY (b)
DROP TABLE t1;
......
......@@ -227,44 +227,44 @@ rpad(null, 10, 'str') as c38;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c00` binary(0) default NULL,
`c01` varchar(6) character set latin2 default NULL,
`c02` varchar(6) character set latin2 default NULL,
`c03` varchar(6) character set latin2 NOT NULL default '',
`c04` varchar(6) character set latin2 default NULL,
`c05` varchar(6) character set latin2 default NULL,
`c06` varchar(6) character set latin2 default NULL,
`c07` varchar(6) character set latin2 default NULL,
`c08` varchar(6) character set latin2 default NULL,
`c09` varchar(6) character set latin2 default NULL,
`c10` varchar(6) character set latin2 default NULL,
`c11` varchar(6) character set latin2 default NULL,
`c12` varchar(6) character set latin2 default NULL,
`c13` varchar(6) character set latin2 default NULL,
`c14` char(0) character set latin2 default NULL,
`c15` char(0) character set latin2 default NULL,
`c16` varchar(6) character set latin2 default NULL,
`c17` varchar(6) character set latin2 default NULL,
`c18` char(0) character set latin2 default NULL,
`c19` varchar(6) character set latin2 default NULL,
`c20` varchar(6) character set latin2 default NULL,
`c21` varchar(6) character set latin2 default NULL,
`c22` varchar(6) character set latin2 default NULL,
`c23` varchar(9) character set latin2 default NULL,
`c24` varchar(9) character set latin2 default NULL,
`c25` varchar(12) character set latin2 default NULL,
`c26` varchar(7) character set latin2 default NULL,
`c27` varchar(7) character set latin2 default NULL,
`c29` varchar(381) character set latin2 default NULL,
`c30` varchar(317) character set latin2 default NULL,
`c31` varchar(192) character set latin2 default NULL,
`c32` char(0) character set latin2 default NULL,
`c33` varchar(3) character set latin2 default NULL,
`c34` varchar(3) character set latin2 default NULL,
`c35` varchar(3) character set latin2 default NULL,
`c36` varchar(3) character set latin2 default NULL,
`c37` varchar(10) character set latin2 default NULL,
`c38` varchar(10) character set latin2 default NULL
`c00` binary(0) DEFAULT NULL,
`c01` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c02` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c03` varchar(6) CHARACTER SET latin2 NOT NULL DEFAULT '',
`c04` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c05` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c06` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c07` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c08` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c09` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c10` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c11` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c12` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c13` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c14` char(0) CHARACTER SET latin2 DEFAULT NULL,
`c15` char(0) CHARACTER SET latin2 DEFAULT NULL,
`c16` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c17` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c18` char(0) CHARACTER SET latin2 DEFAULT NULL,
`c19` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c20` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c21` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c22` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
`c23` varchar(9) CHARACTER SET latin2 DEFAULT NULL,
`c24` varchar(9) CHARACTER SET latin2 DEFAULT NULL,
`c25` varchar(12) CHARACTER SET latin2 DEFAULT NULL,
`c26` varchar(7) CHARACTER SET latin2 DEFAULT NULL,
`c27` varchar(7) CHARACTER SET latin2 DEFAULT NULL,
`c29` varchar(381) CHARACTER SET latin2 DEFAULT NULL,
`c30` varchar(317) CHARACTER SET latin2 DEFAULT NULL,
`c31` varchar(192) CHARACTER SET latin2 DEFAULT NULL,
`c32` char(0) CHARACTER SET latin2 DEFAULT NULL,
`c33` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
`c34` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
`c35` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
`c36` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
`c37` varchar(10) CHARACTER SET latin2 DEFAULT NULL,
`c38` varchar(10) CHARACTER SET latin2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select
......
......@@ -184,7 +184,7 @@ PARTITIONS 1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL
`a` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1 PARTITION BY LIST (a) (PARTITION x1 VALUES IN (1) ENGINE = MEMORY)
drop table t1;
CREATE TABLE t1 (a int, unique(a))
......@@ -208,7 +208,7 @@ PARTITIONS 5;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (a) PARTITIONS 5
drop table t1;
CREATE TABLE t1 (a int)
......@@ -247,7 +247,7 @@ alter table t1 reorganize partition p2 into (partition p2 values less than (30))
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (30) ENGINE = MyISAM)
drop table t1;
CREATE TABLE t1 (a int, b int)
......@@ -267,8 +267,8 @@ ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2 INTO
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL,
`b` int(11) default NULL
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION x1 VALUES LESS THAN (6) ENGINE = MyISAM, PARTITION x3 VALUES LESS THAN (8) ENGINE = MyISAM, PARTITION x4 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION x5 VALUES LESS THAN (12) ENGINE = MyISAM, PARTITION x6 VALUES LESS THAN (14) ENGINE = MyISAM, PARTITION x7 VALUES LESS THAN (16) ENGINE = MyISAM, PARTITION x8 VALUES LESS THAN (18) ENGINE = MyISAM, PARTITION x9 VALUES LESS THAN (20) ENGINE = MyISAM)
drop table t1;
create table t1 (a int not null, b int not null) partition by LIST (a+b) (
......
This diff is collapsed.
......@@ -129,13 +129,13 @@ CREATE TABLE t1 (a INT);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 2;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) default NULL
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) PARTITIONS 2
DROP TABLE t1;
CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
......
......@@ -151,7 +151,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` int(11) NOT NULL,
`c` int(11) NOT NULL,
`d` int(11) default NULL,
`d` int(11) DEFAULT NULL,
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))
drop table t1;
......
......@@ -1775,31 +1775,31 @@ NULL as const12, @arg12 as param12,
show create table t5 ;
Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) unsigned NOT NULL default '0.0',
`param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL DEFAULT '',
`param04` longtext,
`const05` varbinary(3) NOT NULL default '',
`const05` varbinary(3) NOT NULL DEFAULT '',
`param05` longblob,
`const06` varchar(10) NOT NULL default '',
`const06` varchar(10) NOT NULL DEFAULT '',
`param06` longtext,
`const07` date default NULL,
`const07` date DEFAULT NULL,
`param07` longblob,
`const08` varchar(19) NOT NULL default '',
`const08` varchar(19) NOT NULL DEFAULT '',
`param08` longtext,
`const09` datetime default NULL,
`const09` datetime DEFAULT NULL,
`param09` longblob,
`const10` int(10) NOT NULL default '0',
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` decimal(65,30) default NULL,
`const10` int(10) NOT NULL DEFAULT '0',
`param10` bigint(20) DEFAULT NULL,
`const11` int(4) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
`param13` decimal(65,30) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......
......@@ -1758,31 +1758,31 @@ NULL as const12, @arg12 as param12,
show create table t5 ;
Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) unsigned NOT NULL default '0.0',
`param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL DEFAULT '',
`param04` longtext,
`const05` varbinary(3) NOT NULL default '',
`const05` varbinary(3) NOT NULL DEFAULT '',
`param05` longblob,
`const06` varchar(10) NOT NULL default '',
`const06` varchar(10) NOT NULL DEFAULT '',
`param06` longtext,
`const07` date default NULL,
`const07` date DEFAULT NULL,
`param07` longblob,
`const08` varchar(19) NOT NULL default '',
`const08` varchar(19) NOT NULL DEFAULT '',
`param08` longtext,
`const09` datetime default NULL,
`const09` datetime DEFAULT NULL,
`param09` longblob,
`const10` int(10) NOT NULL default '0',
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` decimal(65,30) default NULL,
`const10` int(10) NOT NULL DEFAULT '0',
`param10` bigint(20) DEFAULT NULL,
`const11` int(4) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
`param13` decimal(65,30) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......
......@@ -1759,31 +1759,31 @@ NULL as const12, @arg12 as param12,
show create table t5 ;
Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) unsigned NOT NULL default '0.0',
`param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL DEFAULT '',
`param04` longtext,
`const05` varbinary(3) NOT NULL default '',
`const05` varbinary(3) NOT NULL DEFAULT '',
`param05` longblob,
`const06` varchar(10) NOT NULL default '',
`const06` varchar(10) NOT NULL DEFAULT '',
`param06` longtext,
`const07` date default NULL,
`const07` date DEFAULT NULL,
`param07` longblob,
`const08` varchar(19) NOT NULL default '',
`const08` varchar(19) NOT NULL DEFAULT '',
`param08` longtext,
`const09` datetime default NULL,
`const09` datetime DEFAULT NULL,
`param09` longblob,
`const10` int(10) NOT NULL default '0',
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` decimal(65,30) default NULL,
`const10` int(10) NOT NULL DEFAULT '0',
`param10` bigint(20) DEFAULT NULL,
`const11` int(4) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
`param13` decimal(65,30) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......
......@@ -1695,31 +1695,31 @@ NULL as const12, @arg12 as param12,
show create table t5 ;
Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) unsigned NOT NULL default '0.0',
`param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL DEFAULT '',
`param04` longtext,
`const05` varbinary(3) NOT NULL default '',
`const05` varbinary(3) NOT NULL DEFAULT '',
`param05` longblob,
`const06` varchar(10) NOT NULL default '',
`const06` varchar(10) NOT NULL DEFAULT '',
`param06` longtext,
`const07` date default NULL,
`const07` date DEFAULT NULL,
`param07` longblob,
`const08` varchar(19) NOT NULL default '',
`const08` varchar(19) NOT NULL DEFAULT '',
`param08` longtext,
`const09` datetime default NULL,
`const09` datetime DEFAULT NULL,
`param09` longblob,
`const10` int(10) NOT NULL default '0',
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` decimal(65,30) default NULL,
`const10` int(10) NOT NULL DEFAULT '0',
`param10` bigint(20) DEFAULT NULL,
`const11` int(4) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
`param13` decimal(65,30) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......@@ -4709,31 +4709,31 @@ NULL as const12, @arg12 as param12,
show create table t5 ;
Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) unsigned NOT NULL default '0.0',
`param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL DEFAULT '',
`param04` longtext,
`const05` varbinary(3) NOT NULL default '',
`const05` varbinary(3) NOT NULL DEFAULT '',
`param05` longblob,
`const06` varchar(10) NOT NULL default '',
`const06` varchar(10) NOT NULL DEFAULT '',
`param06` longtext,
`const07` date default NULL,
`const07` date DEFAULT NULL,
`param07` longblob,
`const08` varchar(19) NOT NULL default '',
`const08` varchar(19) NOT NULL DEFAULT '',
`param08` longtext,
`const09` datetime default NULL,
`const09` datetime DEFAULT NULL,
`param09` longblob,
`const10` int(10) NOT NULL default '0',
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` decimal(65,30) default NULL,
`const10` int(10) NOT NULL DEFAULT '0',
`param10` bigint(20) DEFAULT NULL,
`const11` int(4) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
`param13` decimal(65,30) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......
......@@ -1758,31 +1758,31 @@ NULL as const12, @arg12 as param12,
show create table t5 ;
Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) unsigned NOT NULL default '0.0',
`param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL DEFAULT '',
`param04` longtext,
`const05` varbinary(3) NOT NULL default '',
`const05` varbinary(3) NOT NULL DEFAULT '',
`param05` longblob,
`const06` varchar(10) NOT NULL default '',
`const06` varchar(10) NOT NULL DEFAULT '',
`param06` longtext,
`const07` date default NULL,
`const07` date DEFAULT NULL,
`param07` longblob,
`const08` varchar(19) NOT NULL default '',
`const08` varchar(19) NOT NULL DEFAULT '',
`param08` longtext,
`const09` datetime default NULL,
`const09` datetime DEFAULT NULL,
`param09` longblob,
`const10` int(10) NOT NULL default '0',
`param10` bigint(20) default NULL,
`const11` int(4) default NULL,
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` decimal(65,30) default NULL,
`const10` int(10) NOT NULL DEFAULT '0',
`param10` bigint(20) DEFAULT NULL,
`const11` int(4) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
`param13` decimal(65,30) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......
......@@ -33,14 +33,14 @@ id created
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`id` int(11) NOT NULL auto_increment,
`created` datetime default NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show create table t5;
Table Create Table
t5 CREATE TABLE `t5` (
`id` int(11) NOT NULL default '0',
`created` datetime default NULL
`id` int(11) NOT NULL DEFAULT '0',
`created` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2,t3,t5;
This diff is collapsed.
......@@ -29,9 +29,9 @@ insert into t2 values(fn1(2));
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
`a` int(11) NOT NULL DEFAULT '0',
`blob_column` longblob,
`vchar_column` varchar(100) default NULL,
`vchar_column` varchar(100) DEFAULT NULL,
PRIMARY KEY (`a`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY ()
DROP PROCEDURE test.p1;
......
......@@ -103,21 +103,21 @@ c int not null comment 'int column',
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`test_set` set('val1','val2','val3') NOT NULL default '',
`name` char(20) default 'O''Brien' COMMENT 'O''Brien as default',
`test_set` set('val1','val2','val3') NOT NULL DEFAULT '',
`name` char(20) DEFAULT 'O''Brien' COMMENT 'O''Brien as default',
`c` int(11) NOT NULL COMMENT 'int column',
`c-b` int(11) default NULL COMMENT 'name with a minus',
`space 2` int(11) default NULL COMMENT 'name with a space'
`c-b` int(11) DEFAULT NULL COMMENT 'name with a minus',
`space 2` int(11) DEFAULT NULL COMMENT 'name with a space'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='it''s a table'
set sql_quote_show_create=0;
show create table t1;
Table Create Table
t1 CREATE TABLE t1 (
test_set set('val1','val2','val3') NOT NULL default '',
`name` char(20) default 'O''Brien' COMMENT 'O''Brien as default',
test_set set('val1','val2','val3') NOT NULL DEFAULT '',
`name` char(20) DEFAULT 'O''Brien' COMMENT 'O''Brien as default',
c int(11) NOT NULL COMMENT 'int column',
`c-b` int(11) default NULL COMMENT 'name with a minus',
`space 2` int(11) default NULL COMMENT 'name with a space'
`c-b` int(11) DEFAULT NULL COMMENT 'name with a minus',
`space 2` int(11) DEFAULT NULL COMMENT 'name with a space'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='it''s a table'
set sql_quote_show_create=1;
show full columns from t1;
......@@ -162,7 +162,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(10) default NULL,
`b` varchar(10) DEFAULT NULL,
KEY `b` (`b`)
) 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'
alter table t1 MAX_ROWS=200 ROW_FORMAT=dynamic PACK_KEYS=0;
......@@ -170,7 +170,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(10) default NULL,
`b` varchar(10) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=200 AVG_ROW_LENGTH=10 PACK_KEYS=0 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC COMMENT='test'
ALTER TABLE t1 AVG_ROW_LENGTH=0 CHECKSUM=0 COMMENT="" MIN_ROWS=0 MAX_ROWS=0 PACK_KEYS=DEFAULT DELAY_KEY_WRITE=0 ROW_FORMAT=default;
......@@ -178,7 +178,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(10) default NULL,
`b` varchar(10) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
......@@ -227,23 +227,23 @@ index(type_short)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`type_bool` tinyint(1) NOT NULL default '0',
`type_tiny` tinyint(4) NOT NULL auto_increment,
`type_short` smallint(3) default NULL,
`type_mediumint` mediumint(9) default NULL,
`type_bigint` bigint(20) default NULL,
`type_decimal` decimal(5,2) default NULL,
`type_numeric` decimal(5,2) default NULL,
`empty_char` char(0) default NULL,
`type_char` char(2) default NULL,
`type_varchar` varchar(10) default NULL,
`type_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`type_date` date NOT NULL default '0000-00-00',
`type_time` time NOT NULL default '00:00:00',
`type_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`type_year` year(4) default NULL,
`type_enum` enum('red','green','blue') default NULL,
`type_set` enum('red','green','blue') default NULL,
`type_bool` tinyint(1) NOT NULL DEFAULT '0',
`type_tiny` tinyint(4) NOT NULL AUTO_INCREMENT,
`type_short` smallint(3) DEFAULT NULL,
`type_mediumint` mediumint(9) DEFAULT NULL,
`type_bigint` bigint(20) DEFAULT NULL,
`type_decimal` decimal(5,2) DEFAULT NULL,
`type_numeric` decimal(5,2) DEFAULT NULL,
`empty_char` char(0) DEFAULT NULL,
`type_char` char(2) DEFAULT NULL,
`type_varchar` varchar(10) DEFAULT NULL,
`type_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`type_date` date NOT NULL DEFAULT '0000-00-00',
`type_time` time NOT NULL DEFAULT '00:00:00',
`type_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`type_year` year(4) DEFAULT NULL,
`type_enum` enum('red','green','blue') DEFAULT NULL,
`type_set` enum('red','green','blue') DEFAULT NULL,
`type_tinyblob` tinyblob,
`type_blob` blob,
`type_medium_blob` mediumblob,
......@@ -283,28 +283,28 @@ CREATE TABLE ```ab``cd``` (i INT);
SHOW CREATE TABLE ```ab``cd```;
Table Create Table
`ab`cd` CREATE TABLE ```ab``cd``` (
i int(11) default NULL
i int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE ```ab``cd```;
CREATE TABLE ```ab````cd``` (i INT);
SHOW CREATE TABLE ```ab````cd```;
Table Create Table
`ab``cd` CREATE TABLE ```ab````cd``` (
i int(11) default NULL
i int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE ```ab````cd```;
CREATE TABLE ```a` (i INT);
SHOW CREATE TABLE ```a`;
Table Create Table
`a CREATE TABLE ```a` (
i int(11) default NULL
i int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE ```a`;
CREATE TABLE `a.1` (i INT);
SHOW CREATE TABLE `a.1`;
Table Create Table
a.1 CREATE TABLE `a.1` (
i int(11) default NULL
i int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE `a.1`;
SET sql_mode= 'ANSI_QUOTES';
......@@ -312,7 +312,7 @@ CREATE TABLE """a" (i INT);
SHOW CREATE TABLE """a";
Table Create Table
"a CREATE TABLE """a" (
i int(11) default NULL
i int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE """a";
SET sql_mode= '';
......@@ -321,14 +321,14 @@ CREATE TABLE t1 (i INT);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE t1 (
i int(11) default NULL
i int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE `table` (i INT);
SHOW CREATE TABLE `table`;
Table Create Table
table CREATE TABLE `table` (
i int(11) default NULL
i int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE `table`;
SET sql_quote_show_create= @old_sql_quote_show_create;
......@@ -451,7 +451,7 @@ CREATE TABLE t1 (i int, KEY (i)) ENGINE=MEMORY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
`i` int(11) DEFAULT NULL,
KEY `i` (`i`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
DROP TABLE t1;
......@@ -459,7 +459,7 @@ CREATE TABLE t1 (i int, KEY USING HASH (i)) ENGINE=MEMORY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
`i` int(11) DEFAULT NULL,
KEY `i` USING HASH (`i`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
DROP TABLE t1;
......@@ -467,7 +467,7 @@ CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MEMORY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
`i` int(11) DEFAULT NULL,
KEY `i` USING BTREE (`i`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
DROP TABLE t1;
......@@ -475,7 +475,7 @@ CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
`i` int(11) DEFAULT NULL,
KEY `i` (`i`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
......@@ -483,7 +483,7 @@ CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
`i` int(11) DEFAULT NULL,
KEY `i` USING BTREE (`i`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
......@@ -491,14 +491,14 @@ CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
`i` int(11) DEFAULT NULL,
KEY `i` (`i`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t1 ENGINE=MEMORY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
`i` int(11) DEFAULT NULL,
KEY `i` (`i`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
DROP TABLE t1;
......@@ -506,14 +506,14 @@ CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
`i` int(11) DEFAULT NULL,
KEY `i` USING BTREE (`i`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t1 ENGINE=MEMORY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL,
`i` int(11) DEFAULT NULL,
KEY `i` USING BTREE (`i`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
DROP TABLE t1;
......
......@@ -667,12 +667,12 @@ END|
CALL p1(NOW());
Table Create Table
t1 CREATE TABLE "t1" (
"x" varbinary(19) default NULL
"x" varbinary(19) DEFAULT NULL
)
CALL p1('test');
Table Create Table
t1 CREATE TABLE "t1" (
"x" varbinary(19) default NULL
"x" varbinary(19) DEFAULT NULL
)
Warnings:
Warning 1264 Out of range value for column 'x' at row 1
......
......@@ -2418,7 +2418,7 @@ create table t3 as select bug2773()|
show create table t3|
Table Create Table
t3 CREATE TABLE `t3` (
`bug2773()` int(11) default NULL
`bug2773()` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t3|
drop function bug2773|
......@@ -2479,7 +2479,7 @@ tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer
tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer
Table Create Table
t1 CREATE TABLE `t1` (
`id` char(16) NOT NULL default '',
`id` char(16) NOT NULL DEFAULT '',
`data` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Database Create Database
......@@ -2533,7 +2533,7 @@ tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer
tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer
Table Create Table
t1 CREATE TABLE `t1` (
`id` char(16) NOT NULL default '',
`id` char(16) NOT NULL DEFAULT '',
`data` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Database Create Database
......@@ -3852,7 +3852,7 @@ end|
call bug12589_1()|
Table Create Table
tm1 CREATE TEMPORARY TABLE `tm1` (
`spv1` decimal(3,3) default NULL
`spv1` decimal(3,3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Warnings:
Warning 1264 Out of range value for column 'spv1' at row 1
......@@ -3860,12 +3860,12 @@ Warning 1366 Incorrect decimal value: 'test' for column 'spv1' at row 1
call bug12589_2()|
Table Create Table
tm1 CREATE TEMPORARY TABLE `tm1` (
`spv1` decimal(6,3) default NULL
`spv1` decimal(6,3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
call bug12589_3()|
Table Create Table
tm1 CREATE TEMPORARY TABLE `tm1` (
`spv1` decimal(6,3) default NULL
`spv1` decimal(6,3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop procedure bug12589_1|
drop procedure bug12589_2|
......
......@@ -14,9 +14,9 @@ sql_mode
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL auto_increment,
`pseudo` varchar(35) character set latin2 NOT NULL default '',
`email` varchar(60) character set latin2 NOT NULL default '',
`a` int(11) NOT NULL AUTO_INCREMENT,
`pseudo` varchar(35) CHARACTER SET latin2 NOT NULL DEFAULT '',
`email` varchar(60) CHARACTER SET latin2 NOT NULL DEFAULT '',
PRIMARY KEY (`a`),
UNIQUE KEY `email` USING BTREE (`email`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
......@@ -27,9 +27,9 @@ sql_mode ANSI_QUOTES
show create table t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" int(11) NOT NULL auto_increment,
"pseudo" varchar(35) character set latin2 NOT NULL default '',
"email" varchar(60) character set latin2 NOT NULL default '',
"a" int(11) NOT NULL AUTO_INCREMENT,
"pseudo" varchar(35) CHARACTER SET latin2 NOT NULL DEFAULT '',
"email" varchar(60) CHARACTER SET latin2 NOT NULL DEFAULT '',
PRIMARY KEY ("a"),
UNIQUE KEY "email" USING BTREE ("email")
) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
......@@ -40,9 +40,9 @@ sql_mode NO_TABLE_OPTIONS
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL auto_increment,
`pseudo` varchar(35) character set latin2 NOT NULL default '',
`email` varchar(60) character set latin2 NOT NULL default '',
`a` int(11) NOT NULL AUTO_INCREMENT,
`pseudo` varchar(35) CHARACTER SET latin2 NOT NULL DEFAULT '',
`email` varchar(60) CHARACTER SET latin2 NOT NULL DEFAULT '',
PRIMARY KEY (`a`),
UNIQUE KEY `email` USING BTREE (`email`)
)
......@@ -53,9 +53,9 @@ sql_mode NO_KEY_OPTIONS
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL auto_increment,
`pseudo` varchar(35) character set latin2 NOT NULL default '',
`email` varchar(60) character set latin2 NOT NULL default '',
`a` int(11) NOT NULL AUTO_INCREMENT,
`pseudo` varchar(35) CHARACTER SET latin2 NOT NULL DEFAULT '',
`email` varchar(60) CHARACTER SET latin2 NOT NULL DEFAULT '',
PRIMARY KEY (`a`),
UNIQUE KEY `email` (`email`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
......@@ -67,8 +67,8 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`pseudo` varchar(35) NOT NULL default '',
`email` varchar(60) NOT NULL default '',
`pseudo` varchar(35) NOT NULL DEFAULT '',
`email` varchar(60) NOT NULL DEFAULT '',
PRIMARY KEY (`a`),
UNIQUE KEY `email` (`email`)
) TYPE=HEAP ROW_FORMAT=DYNAMIC
......@@ -80,8 +80,8 @@ show create table t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" int(11) NOT NULL,
"pseudo" varchar(35) character set latin2 NOT NULL default '',
"email" varchar(60) character set latin2 NOT NULL default '',
"pseudo" varchar(35) CHARACTER SET latin2 NOT NULL DEFAULT '',
"email" varchar(60) CHARACTER SET latin2 NOT NULL DEFAULT '',
PRIMARY KEY ("a"),
UNIQUE KEY "email" ("email")
)
......@@ -95,25 +95,25 @@ set @@sql_mode="";
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) default NULL,
`b` char(10) character set latin1 collate latin1_bin default NULL,
`c` binary(10) default NULL
`a` char(10) DEFAULT NULL,
`b` char(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`c` binary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
set @@sql_mode="mysql323";
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) default NULL,
`b` char(10) binary default NULL,
`c` binary(10) default NULL
`a` char(10) DEFAULT NULL,
`b` char(10) binary DEFAULT NULL,
`c` binary(10) DEFAULT NULL
) TYPE=MyISAM
set @@sql_mode="mysql40";
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) default NULL,
`b` char(10) binary default NULL,
`c` binary(10) default NULL
`a` char(10) DEFAULT NULL,
`b` char(10) binary DEFAULT NULL,
`c` binary(10) DEFAULT NULL
) TYPE=MyISAM
drop table t1;
set session sql_mode = '';
......@@ -121,7 +121,7 @@ create table t1 ( min_num dec(6,6) default .000001);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`min_num` decimal(6,6) default '0.000001'
`min_num` decimal(6,6) DEFAULT '0.000001'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1 ;
set session sql_mode = 'IGNORE_SPACE';
......@@ -129,14 +129,14 @@ create table t1 ( min_num dec(6,6) default 0.000001);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`min_num` decimal(6,6) default '0.000001'
`min_num` decimal(6,6) DEFAULT '0.000001'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1 ;
create table t1 ( min_num dec(6,6) default .000001);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`min_num` decimal(6,6) default '0.000001'
`min_num` decimal(6,6) DEFAULT '0.000001'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1 ;
set @@SQL_MODE=NULL;
......@@ -148,8 +148,8 @@ f2 timestamp default current_timestamp on update current_timestamp);
show create table t1;
Table Create Table
t1 CREATE TABLE "t1" (
"f1" int(11) NOT NULL auto_increment,
"f2" timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
"f1" int(11) NOT NULL AUTO_INCREMENT,
"f2" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY ("f1")
)
set session sql_mode=no_field_options;
......@@ -157,7 +157,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL,
`f2` timestamp NOT NULL default CURRENT_TIMESTAMP,
`f2` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`f1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
......
......@@ -1009,7 +1009,7 @@ CREATE TABLE t1 (col1 INT NOT NULL default 99, col2 CHAR(6) NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"col1" int(11) NOT NULL default '99',
"col1" int(11) NOT NULL DEFAULT '99',
"col2" char(6) NOT NULL
)
INSERT INTO t1 VALUES (1, 'hello');
......@@ -1266,8 +1266,8 @@ alter table t1 add primary key(a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
`b` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`a` int(11) NOT NULL DEFAULT '0',
`b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
......@@ -1276,8 +1276,8 @@ alter table t1 add primary key(a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
`b` timestamp NOT NULL default '2005-01-02 03:04:05',
`a` int(11) NOT NULL DEFAULT '0',
`b` timestamp NOT NULL DEFAULT '2005-01-02 03:04:05',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
......
......@@ -1087,24 +1087,24 @@ CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(1) NOT NULL default '0',
`(SELECT 1)` bigint(1) NOT NULL default '0'
`a` bigint(1) NOT NULL DEFAULT '0',
`(SELECT 1)` bigint(1) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(1) NOT NULL default '0',
`(SELECT a)` bigint(1) NOT NULL default '0'
`a` bigint(1) NOT NULL DEFAULT '0',
`(SELECT a)` bigint(1) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(1) NOT NULL default '0',
`(SELECT a+0)` bigint(3) NOT NULL default '0'
`a` bigint(1) NOT NULL DEFAULT '0',
`(SELECT a+0)` bigint(3) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a;
......@@ -1114,7 +1114,7 @@ a
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) NOT NULL default '0'
`a` bigint(20) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a int);
......
......@@ -36,7 +36,7 @@ alter table t9 add column c int not null;
show create table t9;
Table Create Table
t9 CREATE TABLE `t9` (
`a` int(11) NOT NULL auto_increment,
`a` int(11) NOT NULL AUTO_INCREMENT,
`b` char(16) NOT NULL,
`c` int(11) NOT NULL,
PRIMARY KEY (`a`)
......@@ -48,7 +48,7 @@ drop table t1;
SHOW CREATE TABLE t9;
Table Create Table
t9 CREATE TABLE `t9` (
`a` int(11) NOT NULL auto_increment,
`a` int(11) NOT NULL AUTO_INCREMENT,
`b` char(16) NOT NULL,
`c` int(11) NOT NULL,
`d` int(11) NOT NULL,
......@@ -66,7 +66,7 @@ count(*)
show create table mysqltest.t9;
Table Create Table
t9 CREATE TABLE `t9` (
`a` int(11) NOT NULL auto_increment,
`a` int(11) NOT NULL AUTO_INCREMENT,
`b` char(16) NOT NULL,
`c` int(11) NOT NULL,
`d` int(11) NOT NULL,
......@@ -84,24 +84,24 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` int(11) default NULL
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` int(11) default NULL
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
......@@ -5,7 +5,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
......@@ -13,7 +13,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
......@@ -21,7 +21,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
......@@ -29,7 +29,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
......@@ -37,7 +37,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
......@@ -45,7 +45,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
......@@ -53,7 +53,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
......@@ -61,7 +61,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
......@@ -69,7 +69,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
......@@ -77,7 +77,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
......@@ -85,7 +85,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
......@@ -93,7 +93,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
......@@ -101,7 +101,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
......@@ -109,7 +109,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
......@@ -117,7 +117,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
......@@ -125,7 +125,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
......@@ -133,7 +133,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
......@@ -141,7 +141,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
......@@ -149,7 +149,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
......@@ -157,7 +157,7 @@ CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
`xx` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
This diff is collapsed.
......@@ -108,7 +108,7 @@ This is temp. table
show create table v1;
Table Create Table
v1 CREATE TEMPORARY TABLE `v1` (
`A` varchar(19) NOT NULL default ''
`A` varchar(19) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show create view v1;
View Create View
......
......@@ -630,7 +630,7 @@ set sql_mode=default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date default NULL
`a` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
......
......@@ -21,8 +21,8 @@ create table t1 (s1 varbinary(20), s2 varbinary(20));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`s1` varbinary(20) default NULL,
`s2` varbinary(20) default NULL
`s1` varbinary(20) DEFAULT NULL,
`s2` varbinary(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0x41,0x4100),(0x41,0x4120),(0x4100,0x4120);
select hex(s1), hex(s2) from t1;
......
......@@ -41,7 +41,7 @@ create table t1 (a bit(0));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) default NULL
`a` bit(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a bit(64));
......@@ -494,7 +494,7 @@ a+0
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` bit(7) default NULL
`a` bit(7) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (id1 int(11), b1 bit(1));
......
......@@ -41,7 +41,7 @@ create table t1 (a bit(0)) engine=innodb;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) default NULL
`a` bit(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a bit(64)) engine=innodb;
......@@ -384,21 +384,21 @@ create table t1 (a bit, b bit(10)) engine=innodb;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) default NULL,
`b` bit(10) default NULL
`a` bit(1) DEFAULT NULL,
`b` bit(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 engine=heap;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) default NULL,
`b` bit(10) default NULL
`a` bit(1) DEFAULT NULL,
`b` bit(10) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
alter table t1 engine=innodb;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) default NULL,
`b` bit(10) default NULL
`a` bit(1) DEFAULT NULL,
`b` bit(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
......@@ -29,7 +29,7 @@ t3 CREATE TABLE `t3` (
show create TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
`c` mediumtext character set utf8 NOT NULL
`c` mediumtext CHARACTER SET utf8 NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1,t2,t3,t4;
CREATE TABLE t1 (a char(257) default "hello");
......@@ -709,11 +709,11 @@ alter table t1 add key (a,b,d,e);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
`b` int(11) NOT NULL default '0',
`a` int(11) NOT NULL DEFAULT '0',
`b` int(11) NOT NULL DEFAULT '0',
`c` tinyblob NOT NULL,
`d` int(11) NOT NULL default '0',
`e` int(11) default NULL,
`d` int(11) NOT NULL DEFAULT '0',
`e` int(11) DEFAULT NULL,
PRIMARY KEY (`a`,`b`,`c`(255),`d`),
KEY `a` (`a`,`b`,`d`,`e`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......
......@@ -709,14 +709,14 @@ create table t1 (d decimal(5));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`d` decimal(5,0) default NULL
`d` decimal(5,0) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (d decimal);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`d` decimal(10,0) default NULL
`d` decimal(10,0) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (d decimal(66,0));
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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