Skip to content

Commit

Permalink
MDEV-28253 Mysqldump - INVISIBLE column error
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Apr 7, 2022
1 parent 7a03128 commit b725a91
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 11 deletions.
12 changes: 12 additions & 0 deletions mysql-test/main/show.result
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
11 changes: 11 additions & 0 deletions mysql-test/main/show.test
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
4 changes: 2 additions & 2 deletions mysql-test/main/show_check.result
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
----------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/suite/funcs_1/r/is_columns.result
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/funcs_1/r/is_columns_is.result
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion sql/sql_show.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion tests/mysql_client_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b725a91

Please sign in to comment.