Skip to content

Commit 7948b75

Browse files
gopshankdahlerlend
authored andcommitted
Bug#27593348 INFORMATION_SCHEMA.STATISTICS FIELD TYPE CHANGE
Post-push fix: Recording mac/win result files.
1 parent 0496f7c commit 7948b75

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

mysql-test/r/show_check_ci.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ test.t1 analyze status OK
7070
show index from t1;
7171
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
7272
def SHOW_STATISTICS Table Table 253 256 2 Y 0 0 255
73-
def SHOW_STATISTICS Non_unique Non_unique 253 4 1 N 1 0 255
73+
def SHOW_STATISTICS Non_unique Non_unique 3 1 1 N 32769 0 63
7474
def SHOW_STATISTICS Key_name Key_name 253 256 7 Y 0 0 255
7575
def mysql index_column_usage SHOW_STATISTICS Seq_in_index Seq_in_index 3 10 1 N 36897 0 63
7676
def SHOW_STATISTICS Column_name Column_name 253 256 1 Y 0 0 255
@@ -696,7 +696,7 @@ PRIMARY KEY(field1(750))
696696
show index from t1;
697697
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
698698
def SHOW_STATISTICS Table Table 253 64 2 Y 0 0 63
699-
def SHOW_STATISTICS Non_unique Non_unique 253 1 1 N 1 0 63
699+
def SHOW_STATISTICS Non_unique Non_unique 3 1 1 N 32769 0 63
700700
def SHOW_STATISTICS Key_name Key_name 253 64 7 Y 0 0 63
701701
def mysql index_column_usage SHOW_STATISTICS Seq_in_index Seq_in_index 3 10 1 N 36897 0 63
702702
def SHOW_STATISTICS Column_name Column_name 253 64 6 Y 0 0 63
@@ -914,7 +914,7 @@ t1 CREATE TABLE `t1` (
914914
SHOW INDEX FROM t1;
915915
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
916916
def SHOW_STATISTICS Table Table 253 192 2 Y 0 0 33
917-
def SHOW_STATISTICS Non_unique Non_unique 253 3 1 N 1 0 33
917+
def SHOW_STATISTICS Non_unique Non_unique 3 1 1 N 32769 0 63
918918
def SHOW_STATISTICS Key_name Key_name 253 192 7 Y 0 0 33
919919
def mysql index_column_usage SHOW_STATISTICS Seq_in_index Seq_in_index 3 10 1 N 36897 0 63
920920
def SHOW_STATISTICS Column_name Column_name 253 192 1 Y 0 0 33

mysql-test/suite/funcs_1/r/is_columns_is_ci.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 1 3 NULL NUL
258258
def information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) select NULL
259259
def information_schema STATISTICS TABLE_SCHEMA 2 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) select NULL
260260
def information_schema STATISTICS TABLE_NAME 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) select NULL
261-
def information_schema STATISTICS NON_UNIQUE 4 NO varchar 1 3 NULL NULL NULL utf8 utf8_general_ci varchar(1) select NULL
261+
def information_schema STATISTICS NON_UNIQUE 4 0 NO int NULL NULL 10 0 NULL NULL NULL int(1) select NULL
262262
def information_schema STATISTICS INDEX_SCHEMA 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) select NULL
263263
def information_schema STATISTICS INDEX_NAME 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) select NULL
264264
def information_schema STATISTICS SEQ_IN_INDEX 7 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select NULL
@@ -693,7 +693,7 @@ NULL information_schema SCHEMATA SQL_PATH binary 0 0 NULL NULL binary(0)
693693
3.0000 information_schema STATISTICS TABLE_CATALOG varchar 64 192 utf8 utf8_bin varchar(64)
694694
3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_bin varchar(64)
695695
3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8 utf8_bin varchar(64)
696-
3.0000 information_schema STATISTICS NON_UNIQUE varchar 1 3 utf8 utf8_general_ci varchar(1)
696+
NULL information_schema STATISTICS NON_UNIQUE int NULL NULL NULL NULL int(1)
697697
3.0000 information_schema STATISTICS INDEX_SCHEMA varchar 64 192 utf8 utf8_bin varchar(64)
698698
3.0000 information_schema STATISTICS INDEX_NAME varchar 64 192 utf8 utf8_bin varchar(64)
699699
NULL information_schema STATISTICS SEQ_IN_INDEX int NULL NULL NULL NULL int(10) unsigned

mysql-test/suite/funcs_1/r/is_statistics_ci.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Field Type Null Key Default Extra
3131
TABLE_CATALOG varchar(64) YES NULL
3232
TABLE_SCHEMA varchar(64) YES NULL
3333
TABLE_NAME varchar(64) YES NULL
34-
NON_UNIQUE varchar(1) NO
34+
NON_UNIQUE int(1) NO 0
3535
INDEX_SCHEMA varchar(64) YES NULL
3636
INDEX_NAME varchar(64) YES NULL
3737
SEQ_IN_INDEX int(10) unsigned NO NULL
@@ -47,13 +47,13 @@ INDEX_COMMENT varchar(2048) NO NULL
4747
IS_VISIBLE varchar(3) NO
4848
SHOW CREATE TABLE information_schema.STATISTICS;
4949
View Create View character_set_client collation_connection
50-
STATISTICS CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `information_schema`.`STATISTICS` AS select (`cat`.`name` collate utf8_tolower_ci) AS `TABLE_CATALOG`,(`sch`.`name` collate utf8_tolower_ci) AS `TABLE_SCHEMA`,(`tbl`.`name` collate utf8_tolower_ci) AS `TABLE_NAME`,if(((`idx`.`type` = 'PRIMARY') or (`idx`.`type` = 'UNIQUE')),'0','1') AS `NON_UNIQUE`,(`sch`.`name` collate utf8_tolower_ci) AS `INDEX_SCHEMA`,(`idx`.`name` collate utf8_tolower_ci) AS `INDEX_NAME`,`icu`.`ordinal_position` AS `SEQ_IN_INDEX`,(`col`.`name` collate utf8_tolower_ci) AS `COLUMN_NAME`,(case when (`icu`.`order` = 'DESC') then 'D' when (`icu`.`order` = 'ASC') then 'A' else NULL end) AS `COLLATION`,internal_index_column_cardinality(`sch`.`name`,`tbl`.`name`,`idx`.`name`,`col`.`name`,`idx`.`ordinal_position`,`icu`.`ordinal_position`,`tbl`.`engine`,`tbl`.`se_private_id`,((`tbl`.`hidden` <> 'Visible') or `idx`.`hidden` or `icu`.`hidden`),coalesce(`stat`.`cardinality`,cast(-(1) as unsigned)),coalesce(cast(`stat`.`cached_time` as unsigned),0)) AS `CARDINALITY`,get_dd_index_sub_part_length(`icu`.`length`,`col`.`type`,`col`.`char_length`,`col`.`collation_id`,`idx`.`type`) AS `SUB_PART`,NULL AS `PACKED`,if((`col`.`is_nullable` = 1),'YES','') AS `NULLABLE`,(case when (`idx`.`type` = 'SPATIAL') then 'SPATIAL' when (`idx`.`algorithm` = 'SE_PRIVATE') then '' else `idx`.`algorithm` end) AS `INDEX_TYPE`,if(((`idx`.`type` = 'PRIMARY') or (`idx`.`type` = 'UNIQUE')),'',if(internal_keys_disabled(`tbl`.`options`),'disabled','')) AS `COMMENT`,`idx`.`comment` AS `INDEX_COMMENT`,if(`idx`.`is_visible`,'YES','NO') AS `IS_VISIBLE` from (((((((`mysql`.`index_column_usage` `icu` join `mysql`.`indexes` `idx` on((`idx`.`id` = `icu`.`index_id`))) join `mysql`.`tables` `tbl` on((`idx`.`table_id` = `tbl`.`id`))) join `mysql`.`columns` `col` on((`icu`.`column_id` = `col`.`id`))) join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`collations` `coll` on((`tbl`.`collation_id` = `coll`.`id`))) left join `mysql`.`index_stats` `stat` on(((`tbl`.`name` = `stat`.`table_name`) and (`sch`.`name` = `stat`.`schema_name`) and (`idx`.`name` = `stat`.`index_name`) and (`col`.`name` = `stat`.`column_name`)))) where (can_access_table(`sch`.`name`,`tbl`.`name`) and is_visible_dd_object(`tbl`.`hidden`,(`idx`.`hidden` or `icu`.`hidden`))) utf8 utf8_general_ci
50+
STATISTICS CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `information_schema`.`STATISTICS` AS select (`cat`.`name` collate utf8_tolower_ci) AS `TABLE_CATALOG`,(`sch`.`name` collate utf8_tolower_ci) AS `TABLE_SCHEMA`,(`tbl`.`name` collate utf8_tolower_ci) AS `TABLE_NAME`,if(((`idx`.`type` = 'PRIMARY') or (`idx`.`type` = 'UNIQUE')),0,1) AS `NON_UNIQUE`,(`sch`.`name` collate utf8_tolower_ci) AS `INDEX_SCHEMA`,(`idx`.`name` collate utf8_tolower_ci) AS `INDEX_NAME`,`icu`.`ordinal_position` AS `SEQ_IN_INDEX`,(`col`.`name` collate utf8_tolower_ci) AS `COLUMN_NAME`,(case when (`icu`.`order` = 'DESC') then 'D' when (`icu`.`order` = 'ASC') then 'A' else NULL end) AS `COLLATION`,internal_index_column_cardinality(`sch`.`name`,`tbl`.`name`,`idx`.`name`,`col`.`name`,`idx`.`ordinal_position`,`icu`.`ordinal_position`,`tbl`.`engine`,`tbl`.`se_private_id`,((`tbl`.`hidden` <> 'Visible') or `idx`.`hidden` or `icu`.`hidden`),coalesce(`stat`.`cardinality`,cast(-(1) as unsigned)),coalesce(cast(`stat`.`cached_time` as unsigned),0)) AS `CARDINALITY`,get_dd_index_sub_part_length(`icu`.`length`,`col`.`type`,`col`.`char_length`,`col`.`collation_id`,`idx`.`type`) AS `SUB_PART`,NULL AS `PACKED`,if((`col`.`is_nullable` = 1),'YES','') AS `NULLABLE`,(case when (`idx`.`type` = 'SPATIAL') then 'SPATIAL' when (`idx`.`algorithm` = 'SE_PRIVATE') then '' else `idx`.`algorithm` end) AS `INDEX_TYPE`,if(((`idx`.`type` = 'PRIMARY') or (`idx`.`type` = 'UNIQUE')),'',if(internal_keys_disabled(`tbl`.`options`),'disabled','')) AS `COMMENT`,`idx`.`comment` AS `INDEX_COMMENT`,if(`idx`.`is_visible`,'YES','NO') AS `IS_VISIBLE` from (((((((`mysql`.`index_column_usage` `icu` join `mysql`.`indexes` `idx` on((`idx`.`id` = `icu`.`index_id`))) join `mysql`.`tables` `tbl` on((`idx`.`table_id` = `tbl`.`id`))) join `mysql`.`columns` `col` on((`icu`.`column_id` = `col`.`id`))) join `mysql`.`schemata` `sch` on((`tbl`.`schema_id` = `sch`.`id`))) join `mysql`.`catalogs` `cat` on((`cat`.`id` = `sch`.`catalog_id`))) join `mysql`.`collations` `coll` on((`tbl`.`collation_id` = `coll`.`id`))) left join `mysql`.`index_stats` `stat` on(((`tbl`.`name` = `stat`.`table_name`) and (`sch`.`name` = `stat`.`schema_name`) and (`idx`.`name` = `stat`.`index_name`) and (`col`.`name` = `stat`.`column_name`)))) where (can_access_table(`sch`.`name`,`tbl`.`name`) and is_visible_dd_object(`tbl`.`hidden`,(`idx`.`hidden` or `icu`.`hidden`))) utf8 utf8_general_ci
5151
SHOW COLUMNS FROM information_schema.STATISTICS;
5252
Field Type Null Key Default Extra
5353
TABLE_CATALOG varchar(64) YES NULL
5454
TABLE_SCHEMA varchar(64) YES NULL
5555
TABLE_NAME varchar(64) YES NULL
56-
NON_UNIQUE varchar(1) NO
56+
NON_UNIQUE int(1) NO 0
5757
INDEX_SCHEMA varchar(64) YES NULL
5858
INDEX_NAME varchar(64) YES NULL
5959
SEQ_IN_INDEX int(10) unsigned NO NULL

mysql-test/suite/sysschema/r/v_schema_redundant_indexes_ci.result

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ table_schema varchar(64) NO
44
table_name varchar(64) NO
55
redundant_index_name varchar(64) NO
66
redundant_index_columns text YES NULL
7-
redundant_index_non_unique varchar(1) YES NULL
8-
dominant_index_name varchar(64) NO
7+
redundant_index_non_unique int(1) YES NULL
8+
dominant_index_name varchar(64) YES NULL
99
dominant_index_columns text YES NULL
10-
dominant_index_non_unique varchar(1) YES NULL
10+
dominant_index_non_unique int(1) YES NULL
1111
subpart_exists int(1) NO 0
1212
sql_drop_index varchar(223) NO
1313
SELECT * FROM sys.schema_redundant_indexes;
1414
DESC sys.x$schema_flattened_keys;
1515
Field Type Null Key Default Extra
16-
table_schema varchar(64) NO
17-
table_name varchar(64) NO
18-
index_name varchar(64) NO
19-
non_unique varchar(1) YES NULL
16+
table_schema varchar(64) YES NULL
17+
table_name varchar(64) YES NULL
18+
index_name varchar(64) YES NULL
19+
non_unique int(1) YES NULL
2020
subpart_exists bigint(1) YES NULL
2121
index_columns text YES NULL
2222
SELECT * FROM sys.x$schema_flattened_keys;

0 commit comments

Comments
 (0)