diff --git a/mysql-test/main/show.result b/mysql-test/main/show.result index 4a9e2738346..e453ee90c7e 100644 --- a/mysql-test/main/show.result +++ b/mysql-test/main/show.result @@ -53,3 +53,15 @@ drop table t1; # # End of 10.2 tests # +# +# MDEV-28253 Mysqldump - INVISIBLE column error +# +create table t1 (a int, b datetime invisible on update now() without system versioning) with system versioning; +desc t1; +Field Type Null Key Default Extra +a int(11) YES NULL +b datetime YES NULL on update current_timestamp(), INVISIBLE, WITHOUT SYSTEM VERSIONING +drop table t1; +# +# End of 10.3 tests +# diff --git a/mysql-test/main/show.test b/mysql-test/main/show.test index 9b0b58349d5..37c30000e59 100644 --- a/mysql-test/main/show.test +++ b/mysql-test/main/show.test @@ -45,3 +45,14 @@ drop table t1; --echo # --echo # End of 10.2 tests --echo # + +--echo # +--echo # MDEV-28253 Mysqldump - INVISIBLE column error +--echo # +create table t1 (a int, b datetime invisible on update now() without system versioning) with system versioning; +desc t1; +drop table t1; + +--echo # +--echo # End of 10.3 tests +--echo # diff --git a/mysql-test/main/show_check.result b/mysql-test/main/show_check.result index ed9e191f06d..81b1566cb4c 100644 --- a/mysql-test/main/show_check.result +++ b/mysql-test/main/show_check.result @@ -983,7 +983,7 @@ def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 def information_schema COLUMNS COLUMNS COLLATION_NAME COLLATION_NAME 253 96 0 Y 4096 0 33 def information_schema COLUMNS COLUMNS COLUMN_TYPE COLUMN_TYPE 252 589815 7 N 4113 0 33 def information_schema COLUMNS COLUMNS COLUMN_KEY COLUMN_KEY 253 9 3 N 4097 0 33 -def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 90 0 N 4097 0 33 +def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 240 0 N 4097 0 33 def information_schema COLUMNS COLUMNS PRIVILEGES PRIVILEGES 253 240 31 N 4097 0 33 def information_schema COLUMNS COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 3072 0 N 4097 0 33 TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT @@ -1002,7 +1002,7 @@ def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 589815 7 N 4113 0 33 def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 9 2 N 4097 0 33 def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 9 3 N 4097 0 33 def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589788 0 Y 4112 0 33 -def information_schema COLUMNS COLUMNS EXTRA Extra 253 90 0 N 4097 0 33 +def information_schema COLUMNS COLUMNS EXTRA Extra 253 240 0 N 4097 0 33 Field Type Null Key Default Extra c int(11) NO PRI NULL ---------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/is_columns.result b/mysql-test/suite/funcs_1/r/is_columns.result index 13042dd11bc..35106e7ded5 100644 --- a/mysql-test/suite/funcs_1/r/is_columns.result +++ b/mysql-test/suite/funcs_1/r/is_columns.result @@ -45,7 +45,7 @@ CHARACTER_SET_NAME varchar(32) YES NULL COLLATION_NAME varchar(32) YES NULL COLUMN_TYPE longtext NO NULL COLUMN_KEY varchar(3) NO NULL -EXTRA varchar(30) NO NULL +EXTRA varchar(80) NO NULL PRIVILEGES varchar(80) NO NULL COLUMN_COMMENT varchar(1024) NO NULL IS_GENERATED varchar(6) NO NULL @@ -70,7 +70,7 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` ( `COLLATION_NAME` varchar(32), `COLUMN_TYPE` longtext NOT NULL, `COLUMN_KEY` varchar(3) NOT NULL, - `EXTRA` varchar(30) NOT NULL, + `EXTRA` varchar(80) NOT NULL, `PRIVILEGES` varchar(80) NOT NULL, `COLUMN_COMMENT` varchar(1024) NOT NULL, `IS_GENERATED` varchar(6) NOT NULL, @@ -95,7 +95,7 @@ CHARACTER_SET_NAME varchar(32) YES NULL COLLATION_NAME varchar(32) YES NULL COLUMN_TYPE longtext NO NULL COLUMN_KEY varchar(3) NO NULL -EXTRA varchar(30) NO NULL +EXTRA varchar(80) NO NULL PRIVILEGES varchar(80) NO NULL COLUMN_COMMENT varchar(1024) NO NULL IS_GENERATED varchar(6) NO NULL diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result index 53bb56742b0..b7c094eec56 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is.result @@ -73,7 +73,7 @@ def information_schema COLUMNS COLUMN_NAME 4 NULL NO varchar 64 192 NULL NULL NU def information_schema COLUMNS COLUMN_TYPE 16 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema COLUMNS DATA_TYPE 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema COLUMNS DATETIME_PRECISION 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema COLUMNS EXTRA 18 NULL NO varchar 30 90 NULL NULL NULL utf8 utf8_general_ci varchar(30) select NEVER NULL +def information_schema COLUMNS EXTRA 18 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL def information_schema COLUMNS GENERATION_EXPRESSION 22 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema COLUMNS IS_GENERATED 21 NULL NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) select NEVER NULL def information_schema COLUMNS IS_NULLABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL @@ -619,7 +619,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi 3.0000 information_schema COLUMNS COLLATION_NAME varchar 32 96 utf8 utf8_general_ci varchar(32) 1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLUMNS EXTRA varchar 30 90 utf8 utf8_general_ci varchar(30) +3.0000 information_schema COLUMNS EXTRA varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024) 3.0000 information_schema COLUMNS IS_GENERATED varchar 6 18 utf8 utf8_general_ci varchar(6) diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result index c0bd2ac09c1..0855cdf58d6 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result @@ -73,7 +73,7 @@ def information_schema COLUMNS COLUMN_NAME 4 NULL NO varchar 64 192 NULL NULL NU def information_schema COLUMNS COLUMN_TYPE 16 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema COLUMNS DATA_TYPE 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema COLUMNS DATETIME_PRECISION 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema COLUMNS EXTRA 18 NULL NO varchar 30 90 NULL NULL NULL utf8 utf8_general_ci varchar(30) NEVER NULL +def information_schema COLUMNS EXTRA 18 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL def information_schema COLUMNS GENERATION_EXPRESSION 22 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema COLUMNS IS_GENERATED 21 NULL NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) NEVER NULL def information_schema COLUMNS IS_NULLABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL @@ -619,7 +619,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi 3.0000 information_schema COLUMNS COLLATION_NAME varchar 32 96 utf8 utf8_general_ci varchar(32) 1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLUMNS EXTRA varchar 30 90 utf8 utf8_general_ci varchar(30) +3.0000 information_schema COLUMNS EXTRA varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024) 3.0000 information_schema COLUMNS IS_GENERATED varchar 6 18 utf8 utf8_general_ci varchar(6) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 2a3dbceb4cb..c0d7d7e95f6 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -9238,7 +9238,7 @@ ST_FIELD_INFO columns_fields_info[]= OPEN_FRM_ONLY}, {"COLUMN_TYPE", 65535, MYSQL_TYPE_STRING, 0, 0, "Type", OPEN_FRM_ONLY}, {"COLUMN_KEY", 3, MYSQL_TYPE_STRING, 0, 0, "Key", OPEN_FRM_ONLY}, - {"EXTRA", 30, MYSQL_TYPE_STRING, 0, 0, "Extra", OPEN_FRM_ONLY}, + {"EXTRA", 80, MYSQL_TYPE_STRING, 0, 0, "Extra", OPEN_FRM_ONLY}, {"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}, diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index dc741b8ec41..326544d58de 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -7557,7 +7557,7 @@ static void test_explain_bug() verify_prepare_field(result, 5, "Extra", "EXTRA", mysql_get_server_version(mysql) <= 50000 ? MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING, - 0, 0, "information_schema", 30, 0); + 0, 0, "information_schema", 80, 0); mysql_free_result(result); mysql_stmt_close(stmt);