Commit da5c3e03 authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-9255 Add generation_expression to information_schema.columns.

        Added IS_GENERATED and GENERATION_EXPRESSION columns required by
        the SQL standard
parent 93dd70ce
......@@ -222,8 +222,8 @@ Field Type Collation Null Key Default Extra Privileges Comment
c varchar(64) utf8_general_ci NO select,insert,update,references
select * from information_schema.COLUMNS where table_name="t1"
and column_name= "a";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
def mysqltest t1 a 1 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
def mysqltest t1 a 1 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
show columns from mysqltest.t1 where field like "%a%";
Field Type Null Key Default Extra
a int(11) YES NULL
......@@ -844,6 +844,7 @@ table_schema table_name column_name
information_schema ALL_PLUGINS PLUGIN_DESCRIPTION
information_schema COLUMNS COLUMN_DEFAULT
information_schema COLUMNS COLUMN_TYPE
information_schema COLUMNS GENERATION_EXPRESSION
information_schema EVENTS EVENT_DEFINITION
information_schema PARAMETERS DTD_IDENTIFIER
information_schema PARTITIONS PARTITION_EXPRESSION
......@@ -1577,9 +1578,9 @@ WHERE TABLE_SCHEMA='mysql' and TABLE_NAME= 'db';
TABLE_COLLATION
utf8_bin
select * from information_schema.columns where table_schema = NULL;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
select * from `information_schema`.`COLUMNS` where `TABLE_NAME` = NULL;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
select * from `information_schema`.`KEY_COLUMN_USAGE` where `TABLE_SCHEMA` = NULL;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
select * from `information_schema`.`KEY_COLUMN_USAGE` where `TABLE_NAME` = NULL;
......@@ -1920,7 +1921,7 @@ LEFT JOIN INFORMATION_SCHEMA.COLUMNS
USING (TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME)
WHERE COLUMNS.TABLE_SCHEMA = 'test'
AND COLUMNS.TABLE_NAME = 't1';
TABLE_SCHEMA TABLE_NAME COLUMN_NAME CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME TABLE_CATALOG ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
TABLE_SCHEMA TABLE_NAME COLUMN_NAME CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME TABLE_CATALOG ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
#
# A test case for Bug#56540 "Exception (crash) in sql_show.cc
# during rqg_info_schema test on Windows"
......
......@@ -44,6 +44,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -64,6 +66,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -84,6 +88,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -104,6 +110,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -124,6 +132,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -144,6 +154,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -164,6 +176,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -184,6 +198,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -204,6 +220,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -224,6 +242,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -244,6 +264,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -264,6 +286,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -284,6 +308,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -304,6 +330,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -324,6 +352,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME PARAMETERS
......@@ -344,6 +374,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
DESCRIBE INFORMATION_SCHEMA.PARAMETERS;
Field Type Null Key Default Extra
SPECIFIC_CATALOG varchar(512) NO
......
......@@ -61,6 +61,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -81,6 +83,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -101,6 +105,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -121,6 +127,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -141,6 +149,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -161,6 +171,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -181,6 +193,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -201,6 +215,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -221,6 +237,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -241,6 +259,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -261,6 +281,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -281,6 +303,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -301,6 +325,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -321,6 +347,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -341,6 +369,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -361,6 +391,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -381,6 +413,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -401,6 +435,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -421,6 +457,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -441,6 +479,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -461,6 +501,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -481,6 +523,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -501,6 +545,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -521,6 +567,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -541,6 +589,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -561,6 +611,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -581,6 +633,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -601,6 +655,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -621,6 +677,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -641,6 +699,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
......@@ -661,6 +721,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
DESCRIBE INFORMATION_SCHEMA.ROUTINES;
Field Type Null Key Default Extra
SPECIFIC_NAME varchar(64) NO
......
......@@ -16,17 +16,17 @@ f11 LONGTEXT UNICODE
SELECT * FROM information_schema.columns
WHERE table_schema LIKE 'test%'
ORDER BY table_schema, table_name, column_name;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
def test t1 f1 1 NULL YES char 1 2 NULL NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references
def test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references
def test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references
def test t1 f2 2 NULL YES char 0 0 NULL NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references
def test t1 f3 3 NULL YES char 10 20 NULL NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references
def test t1 f5 4 NULL YES varchar 0 0 NULL NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references
def test t1 f6 5 NULL YES varchar 255 510 NULL NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references
def test t1 f7 6 NULL YES varchar 260 520 NULL NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references
def test t1 f8 7 NULL YES text 32767 65535 NULL NULL NULL ucs2 ucs2_general_ci text select,insert,update,references
def test t1 f9 8 NULL YES tinytext 127 255 NULL NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
def test t1 f1 1 NULL YES char 1 2 NULL NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references NEVER NULL
def test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references NEVER NULL
def test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references NEVER NULL
def test t1 f2 2 NULL YES char 0 0 NULL NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references NEVER NULL
def test t1 f3 3 NULL YES char 10 20 NULL NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references NEVER NULL
def test t1 f5 4 NULL YES varchar 0 0 NULL NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references NEVER NULL
def test t1 f6 5 NULL YES varchar 255 510 NULL NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references NEVER NULL
def test t1 f7 6 NULL YES varchar 260 520 NULL NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references NEVER NULL
def test t1 f8 7 NULL YES text 32767 65535 NULL NULL NULL ucs2 ucs2_general_ci text select,insert,update,references NEVER NULL
def test t1 f9 8 NULL YES tinytext 127 255 NULL NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references NEVER NULL
##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
##########################################################################
......
......@@ -13,13 +13,13 @@ f7 VARCHAR(260) UNICODE
SELECT * FROM information_schema.columns
WHERE table_schema LIKE 'test%'
ORDER BY table_schema, table_name, column_name;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
def test t1 f1 1 NULL YES char 1 2 NULL NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references
def test t1 f2 2 NULL YES char 0 0 NULL NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references
def test t1 f3 3 NULL YES char 10 20 NULL NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references
def test t1 f5 4 NULL YES varchar 0 0 NULL NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references
def test t1 f6 5 NULL YES varchar 255 510 NULL NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references
def test t1 f7 6 NULL YES varchar 260 520 NULL NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
def test t1 f1 1 NULL YES char 1 2 NULL NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references NEVER NULL
def test t1 f2 2 NULL YES char 0 0 NULL NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references NEVER NULL
def test t1 f3 3 NULL YES char 10 20 NULL NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references NEVER NULL
def test t1 f5 4 NULL YES varchar 0 0 NULL NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references NEVER NULL
def test t1 f6 5 NULL YES varchar 255 510 NULL NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references NEVER NULL
def test t1 f7 6 NULL YES varchar 260 520 NULL NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references NEVER NULL
##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
##########################################################################
......
......@@ -17,17 +17,17 @@ f11 LONGTEXT UNICODE
SELECT * FROM information_schema.columns
WHERE table_schema LIKE 'test%'
ORDER BY table_schema, table_name, column_name;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
def test t1 f1 1 NULL YES char 1 2 NULL NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references
def test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references
def test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references
def test t1 f2 2 NULL YES char 0 0 NULL NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references
def test t1 f3 3 NULL YES char 10 20 NULL NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references
def test t1 f5 4 NULL YES varchar 0 0 NULL NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references
def test t1 f6 5 NULL YES varchar 255 510 NULL NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references
def test t1 f7 6 NULL YES varchar 260 520 NULL NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references
def test t1 f8 7 NULL YES text 32767 65535 NULL NULL NULL ucs2 ucs2_general_ci text select,insert,update,references
def test t1 f9 8 NULL YES tinytext 127 255 NULL NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
def test t1 f1 1 NULL YES char 1 2 NULL NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references NEVER NULL
def test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references NEVER NULL
def test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references NEVER NULL
def test t1 f2 2 NULL YES char 0 0 NULL NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references NEVER NULL
def test t1 f3 3 NULL YES char 10 20 NULL NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references NEVER NULL
def test t1 f5 4 NULL YES varchar 0 0 NULL NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references NEVER NULL
def test t1 f6 5 NULL YES varchar 255 510 NULL NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references NEVER NULL
def test t1 f7 6 NULL YES varchar 260 520 NULL NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references NEVER NULL
def test t1 f8 7 NULL YES text 32767 65535 NULL NULL NULL ucs2 ucs2_general_ci text select,insert,update,references NEVER NULL
def test t1 f9 8 NULL YES tinytext 127 255 NULL NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references NEVER NULL
##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
##########################################################################
......
......@@ -48,6 +48,8 @@ COLUMN_KEY varchar(3) NO
EXTRA varchar(30) NO
PRIVILEGES varchar(80) NO
COLUMN_COMMENT varchar(1024) NO
IS_GENERATED varchar(6) NO
GENERATION_EXPRESSION longtext YES NULL
SHOW CREATE TABLE information_schema.COLUMNS;
Table Create Table
COLUMNS CREATE TEMPORARY TABLE `COLUMNS` (
......@@ -70,7 +72,9 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` (
`COLUMN_KEY` varchar(3) NOT NULL DEFAULT '',
`EXTRA` varchar(30) NOT NULL DEFAULT '',
`PRIVILEGES` varchar(80) NOT NULL DEFAULT '',
`COLUMN_COMMENT` varchar(1024) NOT NULL DEFAULT ''
`COLUMN_COMMENT` varchar(1024) NOT NULL DEFAULT '',
`IS_GENERATED` varchar(6) NOT NULL DEFAULT '',
`GENERATION_EXPRESSION` longtext DEFAULT NULL
) DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.COLUMNS;
Field Type Null Key Default Extra
......@@ -94,6 +98,8 @@ COLUMN_KEY varchar(3) NO
EXTRA varchar(30) NO
PRIVILEGES varchar(80) NO
COLUMN_COMMENT varchar(1024) NO
IS_GENERATED varchar(6) NO
GENERATION_EXPRESSION longtext YES NULL
SELECT table_catalog, table_schema, table_name, column_name
FROM information_schema.columns WHERE table_catalog IS NULL OR table_catalog <> 'def';
table_catalog table_schema table_name column_name
......@@ -120,17 +126,17 @@ GRANT INSERT(f1, f2) ON db_datadict.t2 TO 'testuser2'@'localhost';
SELECT * FROM information_schema.columns
WHERE table_schema = 'db_datadict'
ORDER BY table_schema, table_name, ordinal_position;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
def db_datadict t1 f1 1 NULL YES char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) MUL select,insert,update,references
def db_datadict t1 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references
def db_datadict t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references
def db_datadict t1 f4 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) PRI auto_increment select,insert,update,references
def db_datadict t2 f1 1 NULL NO char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) PRI select,insert,update,references
def db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references
def db_datadict t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references
def db_datadict t2 f4 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) PRI select,insert,update,references
def db_datadict v1 f1 1 0 NO int NULL NULL 10 0 NULL NULL NULL int(1) select,insert,update,references
def db_datadict v1 f2 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(1) select,insert,update,references
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
def db_datadict t1 f1 1 NULL YES char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) MUL select,insert,update,references NEVER NULL
def db_datadict t1 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NEVER NULL
def db_datadict t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def db_datadict t1 f4 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) PRI auto_increment select,insert,update,references NEVER NULL
def db_datadict t2 f1 1 NULL NO char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) PRI select,insert,update,references NEVER NULL
def db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NEVER NULL
def db_datadict t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references NEVER NULL
def db_datadict t2 f4 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) PRI select,insert,update,references NEVER NULL
def db_datadict v1 f1 1 0 NO int NULL NULL 10 0 NULL NULL NULL int(1) select,insert,update,references NEVER NULL
def db_datadict v1 f2 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(1) select,insert,update,references NEVER NULL
SHOW COLUMNS FROM db_datadict.t1;
Field Type Null Key Default Extra
f1 char(10) YES MUL NULL
......@@ -151,10 +157,10 @@ connect testuser1, localhost, testuser1, , db_datadict;
SELECT * FROM information_schema.columns
WHERE table_schema = 'db_datadict'
ORDER BY table_schema, table_name, ordinal_position;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
def db_datadict t1 f1 1 NULL YES char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) MUL select
def db_datadict t1 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select
def db_datadict v1 f2 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(1) select
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
def db_datadict t1 f1 1 NULL YES char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) MUL select NEVER NULL
def db_datadict t1 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text select NEVER NULL
def db_datadict v1 f2 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(1) select NEVER NULL
SHOW COLUMNS FROM db_datadict.t1;
Field Type Null Key Default Extra
f1 char(10) YES MUL NULL
......@@ -168,9 +174,9 @@ connect testuser2, localhost, testuser2, , db_datadict;
SELECT * FROM information_schema.columns
WHERE table_schema = 'db_datadict'
ORDER BY table_schema, table_name, ordinal_position;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
def db_datadict t2 f1 1 NULL NO char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) PRI insert
def db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text insert
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
def db_datadict t2 f1 1 NULL NO char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) PRI insert NEVER NULL
def db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text insert NEVER NULL
SHOW COLUMNS FROM db_datadict.t1;
ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 't1'
SHOW COLUMNS FROM db_datadict.t2;
......@@ -219,6 +225,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES select,insert,update,references
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
SELECT table_name FROM information_schema.columns
WHERE table_name LIKE 't1_my_table%';
table_name
......@@ -425,6 +433,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES select,insert,update,references
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
TABLE_CATALOG def
TABLE_SCHEMA test
TABLE_NAME t1_my_tablex
......@@ -445,6 +455,8 @@ COLUMN_KEY
EXTRA
PRIVILEGES select,insert,update,references
COLUMN_COMMENT
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
DROP VIEW test.t1_my_tablex;
SELECT table_name FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -575,3 +575,17 @@ SELECT 1 FROM t WHERE c GROUP BY b;
1
COMMIT;
DROP TABLE t;
#
# MDEV-9255 Add generation_expression to information_schema.columns.
#
CREATE TABLE gcol_t1 (
sidea DOUBLE,
sideb DOUBLE,
sidec DOUBLE AS (SQRT(sidea * sidea + sideb * sideb))
);
SELECT * FROM information_schema.columns WHERE table_name='gcol_t1';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
def test gcol_t1 sidea 1 NULL YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
def test gcol_t1 sideb 2 NULL YES double NULL NULL 22 NULL NULL NULL NULL double select,insert,update,references NEVER NULL
def test gcol_t1 sidec 3 NULL YES double NULL NULL 22 NULL NULL NULL NULL double VIRTUAL GENERATED select,insert,update,references ALWAYS sqrt(`sidea` * `sidea` + `sideb` * `sideb`)
DROP TABLE gcol_t1;
......@@ -536,3 +536,17 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ;
SELECT 1 FROM t WHERE c GROUP BY b;
COMMIT;
DROP TABLE t;
--echo #
--echo # MDEV-9255 Add generation_expression to information_schema.columns.
--echo #
CREATE TABLE gcol_t1 (
sidea DOUBLE,
sideb DOUBLE,
sidec DOUBLE AS (SQRT(sidea * sidea + sideb * sideb))
);
SELECT * FROM information_schema.columns WHERE table_name='gcol_t1';
DROP TABLE gcol_t1;
......@@ -5505,13 +5505,24 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
table->field[17]->store(STRING_WITH_LEN("auto_increment"), cs);
if (print_on_update_clause(field, &type, true))
table->field[17]->store(type.ptr(), type.length(), cs);
if (field->vcol_info)
{
String gen_s(tmp,sizeof(tmp), system_charset_info);
gen_s.length(0);
field->vcol_info->print(&gen_s);
table->field[21]->store(gen_s.ptr(), gen_s.length(), cs);
table->field[21]->set_notnull();
table->field[20]->store(STRING_WITH_LEN("ALWAYS"), cs);
if (field->vcol_info->stored_in_db)
table->field[17]->store(STRING_WITH_LEN("STORED GENERATED"), cs);
else
table->field[17]->store(STRING_WITH_LEN("VIRTUAL GENERATED"), cs);
}
else
table->field[20]->store(STRING_WITH_LEN("NEVER"), cs);
table->field[19]->store(field->comment.str, field->comment.length, cs);
if (schema_table_store_record(thd, table))
DBUG_RETURN(1);
......@@ -8444,6 +8455,9 @@ ST_FIELD_INFO columns_fields_info[]=
{"PRIVILEGES", 80, MYSQL_TYPE_STRING, 0, 0, "Privileges", OPEN_FRM_ONLY},
{"COLUMN_COMMENT", COLUMN_COMMENT_MAXLEN, MYSQL_TYPE_STRING, 0, 0,
"Comment", OPEN_FRM_ONLY},
{"IS_GENERATED", 6, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FRM_ONLY},
{"GENERATION_EXPRESSION", MAX_FIELD_VARCHARLENGTH, MYSQL_TYPE_STRING, 0, 1,
0, OPEN_FRM_ONLY},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
};
......
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