Commit 291411c9 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-13132 Information Schema does not show whether column default is expression or literal

Fix INFORMATION_SCHEMA.COLUMNS.COLUMN_DEFAULT to be standard-compliant,
but keep SHOW COLUMNS backward-compatibly unchanged.
parent 0559f129
......@@ -3,7 +3,7 @@ set @@global.concurrent_insert= 0;
drop table if exists t1;
create table t1 (
`a&b` int,
`a<b` int,
`a<b` int NOT NULL,
`a>b` text
);
insert into t1 values (1, 2, 'a&b a<b a>b');
......@@ -21,9 +21,9 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
<table_structure name="t1">
<field Field="a&amp;b" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
<field Field="a&lt;b" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
<field Field="a&gt;b" Type="text" Null="YES" Key="" Extra="" Comment="" />
<field Field="a&amp;b" Type="int(11)" Null="YES" Key="" Default="NULL" Extra="" Comment="" />
<field Field="a&lt;b" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
<field Field="a&gt;b" Type="text" Null="YES" Key="" Default="NULL" Extra="" Comment="" />
</table_structure>
<table_data name="t1">
<row>
......
......@@ -1344,13 +1344,13 @@ DROP TABLE IF EXISTS bug23037;
DROP FUNCTION IF EXISTS get_value;
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';
COLUMN_NAME MD5(COLUMN_DEFAULT) LENGTH(COLUMN_DEFAULT)
fld1 7cf7a6782be951a1f2464a350da926a5 65532
fld1 85ea6a55b8f0058e640b3de141a3a9d9 65534
SELECT MD5(get_value());
MD5(get_value())
7cf7a6782be951a1f2464a350da926a5
76176d2daa20c582375b8dcfc18033cd
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT), COLUMN_DEFAULT=get_value() FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';
COLUMN_NAME MD5(COLUMN_DEFAULT) LENGTH(COLUMN_DEFAULT) COLUMN_DEFAULT=get_value()
fld1 7cf7a6782be951a1f2464a350da926a5 65532 1
fld1 85ea6a55b8f0058e640b3de141a3a9d9 65534 0
DROP TABLE bug23037;
DROP FUNCTION get_value;
set @tmp_optimizer_switch=@@optimizer_switch;
......@@ -1437,12 +1437,12 @@ select column_default from information_schema.columns where table_name= 't1';
column_default
NULL
NULL
''
NULL
NULL
10
NULL
2006-01-01 00:00:00
'2006-01-01 00:00:00'
show columns from t1;
Field Type Null Key Default Extra
f1 varchar(50) YES NULL
......
......@@ -29,7 +29,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
COLUMN_NAME SPECIFIC_CATALOG
ORDINAL_POSITION 1
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 512
......@@ -51,7 +51,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
COLUMN_NAME SPECIFIC_SCHEMA
ORDINAL_POSITION 2
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
......@@ -73,7 +73,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
COLUMN_NAME SPECIFIC_NAME
ORDINAL_POSITION 3
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
......@@ -161,7 +161,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
COLUMN_NAME DATA_TYPE
ORDINAL_POSITION 7
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
......@@ -337,7 +337,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
COLUMN_NAME DTD_IDENTIFIER
ORDINAL_POSITION 15
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE longtext
CHARACTER_MAXIMUM_LENGTH 4294967295
......@@ -359,7 +359,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
COLUMN_NAME ROUTINE_TYPE
ORDINAL_POSITION 16
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 9
......
......@@ -46,7 +46,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME SPECIFIC_NAME
ORDINAL_POSITION 1
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
......@@ -68,7 +68,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME ROUTINE_CATALOG
ORDINAL_POSITION 2
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 512
......@@ -90,7 +90,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME ROUTINE_SCHEMA
ORDINAL_POSITION 3
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
......@@ -112,7 +112,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME ROUTINE_NAME
ORDINAL_POSITION 4
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
......@@ -134,7 +134,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME ROUTINE_TYPE
ORDINAL_POSITION 5
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 9
......@@ -156,7 +156,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME DATA_TYPE
ORDINAL_POSITION 6
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
......@@ -354,7 +354,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME ROUTINE_BODY
ORDINAL_POSITION 15
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 8
......@@ -442,7 +442,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME PARAMETER_STYLE
ORDINAL_POSITION 19
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 8
......@@ -464,7 +464,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME IS_DETERMINISTIC
ORDINAL_POSITION 20
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 3
......@@ -486,7 +486,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME SQL_DATA_ACCESS
ORDINAL_POSITION 21
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
......@@ -530,7 +530,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME SECURITY_TYPE
ORDINAL_POSITION 23
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 7
......@@ -552,7 +552,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME CREATED
ORDINAL_POSITION 24
COLUMN_DEFAULT 0000-00-00 00:00:00
COLUMN_DEFAULT '0000-00-00 00:00:00'
IS_NULLABLE NO
DATA_TYPE datetime
CHARACTER_MAXIMUM_LENGTH NULL
......@@ -574,7 +574,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME LAST_ALTERED
ORDINAL_POSITION 25
COLUMN_DEFAULT 0000-00-00 00:00:00
COLUMN_DEFAULT '0000-00-00 00:00:00'
IS_NULLABLE NO
DATA_TYPE datetime
CHARACTER_MAXIMUM_LENGTH NULL
......@@ -596,7 +596,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME SQL_MODE
ORDINAL_POSITION 26
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 8192
......@@ -618,7 +618,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME ROUTINE_COMMENT
ORDINAL_POSITION 27
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE longtext
CHARACTER_MAXIMUM_LENGTH 4294967295
......@@ -640,7 +640,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME DEFINER
ORDINAL_POSITION 28
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 189
......@@ -662,7 +662,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME CHARACTER_SET_CLIENT
ORDINAL_POSITION 29
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 32
......@@ -684,7 +684,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME COLLATION_CONNECTION
ORDINAL_POSITION 30
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 32
......@@ -706,7 +706,7 @@ TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME DATABASE_COLLATION
ORDINAL_POSITION 31
COLUMN_DEFAULT
COLUMN_DEFAULT ''
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 32
......
......@@ -757,8 +757,8 @@ statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statist
columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT
from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user';
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT
user Host def mysql 0 mysql PRIMARY 1 A NULL NULL BTREE def mysql NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
user User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql NO char 80 240 NULL NULL utf8 utf8_bin char(80) PRI
user Host def mysql 0 mysql PRIMARY 1 A NULL NULL BTREE def mysql '' NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
user User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql '' NO char 80 240 NULL NULL utf8 utf8_bin char(80) PRI
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
......
This diff is collapsed.
......@@ -296,7 +296,7 @@ SELECT table_name, column_name, column_default
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name column_default
t1_my_tablex first_col hello
t1_my_tablex first_col 'hello'
SELECT table_name, column_name, is_nullable
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
......
......@@ -472,15 +472,15 @@ def test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL NULL latin1
def test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob select,insert,update,references NEVER NULL
def test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
def test tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
def test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test tb2 f108 50 1enum NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test tb2 f109 51 1set NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
def test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
def test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
......@@ -522,9 +522,9 @@ def test tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsign
def test tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
def test tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
def test tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
def test tb3 f118 1 a NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f119 2  NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) select,insert,update,references NEVER NULL
def test tb3 f120 3  NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f118 1 'a' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f119 2 '' NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) select,insert,update,references NEVER NULL
def test tb3 f120 3 '' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NEVER NULL
def test tb3 f122 5 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NEVER NULL
def test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references NEVER NULL
......@@ -533,7 +533,7 @@ def test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob
def test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
def test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL NULL mediumblob select,insert,update,references NEVER NULL
def test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
def test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
def test tb3 f129 12 '' NO binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
def test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) select,insert,update,references NEVER NULL
def test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
def test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
......@@ -639,15 +639,15 @@ def test tb4 f239 56 NULL YES varchar 20000 20000 NULL NULL NULL latin1 latin1_b
def test tb4 f240 57 NULL YES varchar 2000 2000 NULL NULL NULL latin1 latin1_swedish_ci varchar(2000) select,insert,update,references NEVER NULL
def test tb4 f241 58 NULL YES char 100 100 NULL NULL NULL latin1 latin1_swedish_ci char(100) select,insert,update,references NEVER NULL
def test1 tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
def test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test1 tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test1 tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test1 tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test1 tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test1 tb2 f109 51 1set NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test1 tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test1 tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
def test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
def test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
......
......@@ -473,15 +473,15 @@ def test tb1 f56 48 0000000099 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(
def test tb1 f57 49 99 NO decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) select,insert,update,references NEVER NULL
def test tb1 f58 50 99 NO decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) select,insert,update,references NEVER NULL
def test tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
def test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test tb2 f108 50 1enum NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test tb2 f109 51 1set NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
def test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
def test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
......@@ -523,12 +523,12 @@ def test tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsign
def test tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
def test tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
def test tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
def test tb3 f118 1 a NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f119 2  NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) select,insert,update,references NEVER NULL
def test tb3 f120 3  NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f118 1 'a' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f119 2 '' NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) select,insert,update,references NEVER NULL
def test tb3 f120 3 '' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f121 4 NULL YES char 50 50 NULL NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references NEVER NULL
def test tb3 f122 5 NULL YES char 50 50 NULL NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references NEVER NULL
def test tb3 f129 6  NO binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
def test tb3 f129 6 '' NO binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
def test tb3 f130 7 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) select,insert,update,references NEVER NULL
def test tb3 f131 8 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
def test tb3 f132 9 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
......@@ -633,15 +633,15 @@ def test tb4 f239 56 NULL YES varbinary 0 0 NULL NULL NULL NULL NULL varbinary(0
def test tb4 f240 57 NULL YES varchar 1200 1200 NULL NULL NULL latin1 latin1_swedish_ci varchar(1200) select,insert,update,references NEVER NULL
def test tb4 f241 53 NULL YES char 255 255 NULL NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references NEVER NULL
def test1 tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
def test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test1 tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test1 tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test1 tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test1 tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test1 tb2 f109 51 1set NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test1 tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test1 tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned select,insert,update,references NEVER NULL
def test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL NULL decimal(64,0) unsigned select,insert,update,references NEVER NULL
def test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NEVER NULL
......
......@@ -521,15 +521,15 @@ def test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL NULL latin1
def test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob select,insert,update,references NEVER NULL
def test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
def test tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
def test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test tb2 f108 50 1enum NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test tb2 f109 51 1set NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
def test tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) select,insert,update,references NEVER NULL
def test tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
......@@ -579,9 +579,9 @@ def test tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsign
def test tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
def test tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
def test tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill select,insert,update,references NEVER NULL
def test tb3 f118 1 a NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f119 2  NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) select,insert,update,references NEVER NULL
def test tb3 f120 3  NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f118 1 'a' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f119 2 '' NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) select,insert,update,references NEVER NULL
def test tb3 f120 3 '' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references NEVER NULL
def test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NEVER NULL
def test tb3 f122 5 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NEVER NULL
def test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references NEVER NULL
......@@ -590,7 +590,7 @@ def test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob
def test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
def test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL NULL mediumblob select,insert,update,references NEVER NULL
def test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references NEVER NULL
def test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
def test tb3 f129 12 '' NO binary 1 1 NULL NULL NULL NULL NULL binary(1) select,insert,update,references NEVER NULL
def test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) select,insert,update,references NEVER NULL
def test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references NEVER NULL
def test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill select,insert,update,references NEVER NULL
......@@ -705,15 +705,15 @@ def test tb4 f240 65 NULL YES varchar 120 120 NULL NULL NULL latin1 latin1_swedi
def test tb4 f241 66 NULL YES char 100 100 NULL NULL NULL latin1 latin1_swedish_ci char(100) select,insert,update,references NEVER NULL
def test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL NULL bit(30) select,insert,update,references NEVER NULL
def test1 tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill select,insert,update,references NEVER NULL
def test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test1 tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def test1 tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references NEVER NULL
def test1 tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def test1 tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NEVER NULL
def test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test1 tb2 f109 51 1set NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test1 tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NEVER NULL
def test1 tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NEVER NULL
def test1 tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
def test1 tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) select,insert,update,references NEVER NULL
def test1 tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) select,insert,update,references NEVER NULL
......
......@@ -521,15 +521,15 @@ def test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL NULL latin1
def test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob NEVER NULL
def test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
def test tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
def test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
def test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL 0 NULL NULL time NEVER NULL
def test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
def test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp NEVER NULL
def test tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
def test tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time NEVER NULL
def test tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
def test tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp NEVER NULL
def test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
def test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
def test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
def test tb2 f108 50 1enum NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') NEVER NULL
def test tb2 f109 51 1set NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') NEVER NULL
def test tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') NEVER NULL
def test tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') NEVER NULL
def test tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
def test tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) NEVER NULL
def test tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
......@@ -579,9 +579,9 @@ def test tb2 f96 38 8.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsign
def test tb2 f97 39 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
def test tb2 f98 40 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
def test tb2 f99 41 0000000008.8 NO float NULL NULL 12 NULL NULL NULL NULL float unsigned zerofill NEVER NULL
def test tb3 f118 1 a NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) NEVER NULL
def test tb3 f119 2  NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) NEVER NULL
def test tb3 f120 3  NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) NEVER NULL
def test tb3 f118 1 'a' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) NEVER NULL
def test tb3 f119 2 '' NO char 1 1 NULL NULL NULL latin1 latin1_bin char(1) NEVER NULL
def test tb3 f120 3 '' NO char 1 1 NULL NULL NULL latin1 latin1_swedish_ci char(1) NEVER NULL
def test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL NULL latin1 latin1_swedish_ci tinytext NEVER NULL
def test tb3 f122 5 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text NEVER NULL
def test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL NULL latin1 latin1_swedish_ci mediumtext NEVER NULL
......@@ -590,7 +590,7 @@ def test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL NULL tinyblob
def test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
def test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL NULL mediumblob NEVER NULL
def test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob NEVER NULL
def test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL NULL binary(1) NEVER NULL
def test tb3 f129 12 '' NO binary 1 1 NULL NULL NULL NULL NULL binary(1) NEVER NULL
def test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(4) NEVER NULL
def test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned NEVER NULL
def test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned zerofill NEVER NULL
......@@ -705,15 +705,15 @@ def test tb4 f240 65 NULL YES varchar 120 120 NULL NULL NULL latin1 latin1_swedi
def test tb4 f241 66 NULL YES char 100 100 NULL NULL NULL latin1 latin1_swedish_ci char(100) NEVER NULL
def test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL NULL bit(30) NEVER NULL
def test1 tb2 f100 42 00000000000000000008.8 NO double NULL NULL 22 NULL NULL NULL NULL double unsigned zerofill NEVER NULL
def test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
def test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL 0 NULL NULL time NEVER NULL
def test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
def test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp NEVER NULL
def test1 tb2 f101 43 '2000-01-01' NO date NULL NULL NULL NULL NULL NULL NULL date NEVER NULL
def test1 tb2 f102 44 '00:00:20' NO time NULL NULL NULL NULL 0 NULL NULL time NEVER NULL
def test1 tb2 f103 45 '0002-02-02 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
def test1 tb2 f104 46 '2000-12-31 23:59:59' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp NEVER NULL
def test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
def test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
def test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL NULL year(4) NEVER NULL
def test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') NEVER NULL
def test1 tb2 f109 51 1set NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') NEVER NULL
def test1 tb2 f108 50 '1enum' NO enum 5 5 NULL NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') NEVER NULL
def test1 tb2 f109 51 '1set' NO set 9 9 NULL NULL NULL latin1 latin1_swedish_ci set('1set','2set') NEVER NULL
def test1 tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
def test1 tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL NULL varbinary(27) NEVER NULL
def test1 tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL NULL varbinary(64) NEVER NULL
......
......@@ -246,8 +246,8 @@ def performance_schema events_statements_summary_by_digest SUM_SORT_ROWS 24 NULL
def performance_schema events_statements_summary_by_digest SUM_SORT_SCAN 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def performance_schema events_statements_summary_by_digest SUM_NO_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def performance_schema events_statements_summary_by_digest SUM_NO_GOOD_INDEX_USED 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def performance_schema events_statements_summary_by_digest FIRST_SEEN 28 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema events_statements_summary_by_digest LAST_SEEN 29 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema events_statements_summary_by_digest FIRST_SEEN 28 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema events_statements_summary_by_digest LAST_SEEN 29 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema events_statements_summary_by_host_by_event_name HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
def performance_schema events_statements_summary_by_host_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
def performance_schema events_statements_summary_by_host_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
......@@ -529,10 +529,10 @@ def performance_schema host_cache COUNT_DEFAULT_DATABASE_ERRORS 22 NULL NO bigin
def performance_schema host_cache COUNT_INIT_CONNECT_ERRORS 23 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
def performance_schema host_cache COUNT_LOCAL_ERRORS 24 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
def performance_schema host_cache COUNT_UNKNOWN_ERRORS 25 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
def performance_schema host_cache FIRST_SEEN 26 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema host_cache LAST_SEEN 27 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema host_cache FIRST_ERROR_SEEN 28 0000-00-00 00:00:00 YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema host_cache LAST_ERROR_SEEN 29 0000-00-00 00:00:00 YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema host_cache FIRST_SEEN 26 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema host_cache LAST_SEEN 27 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema host_cache FIRST_ERROR_SEEN 28 '0000-00-00 00:00:00' YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema host_cache LAST_ERROR_SEEN 29 '0000-00-00 00:00:00' YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NEVER NULL
def performance_schema mutex_instances NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
def performance_schema mutex_instances OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def performance_schema mutex_instances LOCKED_BY_THREAD_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
......@@ -560,19 +560,19 @@ def performance_schema session_connect_attrs PROCESSLIST_ID 1 NULL NO int NULL N
def performance_schema session_connect_attrs ATTR_NAME 2 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_bin varchar(32) select,insert,update,references NEVER NULL
def performance_schema session_connect_attrs ATTR_VALUE 3 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_bin varchar(1024) select,insert,update,references NEVER NULL
def performance_schema session_connect_attrs ORDINAL_POSITION 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
def performance_schema setup_actors HOST 1 % NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
def performance_schema setup_actors USER 2 % NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
def performance_schema setup_actors ROLE 3 % NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
def performance_schema setup_actors HOST 1 '%' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
def performance_schema setup_actors USER 2 '%' NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
def performance_schema setup_actors ROLE 3 '%' NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
def performance_schema setup_consumers NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
def performance_schema setup_consumers ENABLED 2 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
def performance_schema setup_instruments NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
def performance_schema setup_instruments ENABLED 2 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
def performance_schema setup_instruments TIMED 3 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
def performance_schema setup_objects OBJECT_TYPE 1 TABLE NO enum 5 15 NULL NULL NULL utf8 utf8_general_ci enum('TABLE') select,insert,update,references NEVER NULL
def performance_schema setup_objects OBJECT_SCHEMA 2 % YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
def performance_schema setup_objects OBJECT_NAME 3 % NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
def performance_schema setup_objects ENABLED 4 YES NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
def performance_schema setup_objects TIMED 5 YES NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
def performance_schema setup_objects OBJECT_TYPE 1 'TABLE' NO enum 5 15 NULL NULL NULL utf8 utf8_general_ci enum('TABLE') select,insert,update,references NEVER NULL
def performance_schema setup_objects OBJECT_SCHEMA 2 '%' YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
def performance_schema setup_objects OBJECT_NAME 3 '%' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
def performance_schema setup_objects ENABLED 4 'YES' NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
def performance_schema setup_objects TIMED 5 'YES' NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
def performance_schema setup_timers NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
def performance_schema setup_timers TIMER_NAME 2 NULL NO enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') select,insert,update,references NEVER NULL
def performance_schema socket_instances EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
......
......@@ -14,7 +14,7 @@ drop table if exists t1;
# sure that basic encoding issues are handled properly
create table t1 (
`a&b` int,
`a<b` int,
`a<b` int NOT NULL,
`a>b` text
);
insert into t1 values (1, 2, 'a&b a<b a>b');
......
......@@ -5447,6 +5447,7 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
TABLE *show_table;
Field **ptr, *field;
int count;
bool quoted_defaults= lex->sql_command != SQLCOM_SHOW_FIELDS;
DBUG_ENTER("get_schema_column_record");
if (res)
......@@ -5516,7 +5517,7 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
cs);
table->field[4]->store((longlong) count, TRUE);
if (get_field_default_value(thd, field, &type, 0))
if (get_field_default_value(thd, field, &type, quoted_defaults))
{
table->field[5]->store(type.ptr(), type.length(), cs);
table->field[5]->set_notnull();
......
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