From b17f33a04b346265170fc869228f00d79391f18c Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Mon, 4 Oct 2021 22:37:59 +0300 Subject: [PATCH] MDEV-26737: Outdated VARIABLE_COMMENT for HISTOGRAM_TYPE in I_S.SYSTEM_VARIABLES Fix the description --- mysql-test/main/mysqld--help.result | 3 ++- mysql-test/main/statistics_json.result | 6 ++++++ mysql-test/main/statistics_json.test | 5 +++++ sql/sys_vars.cc | 3 ++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result index a8aa461c863..d2799d6e009 100644 --- a/mysql-test/main/mysqld--help.result +++ b/mysql-test/main/mysqld--help.result @@ -368,7 +368,8 @@ The following specify which files/extra groups are read (specified before remain Specifies type of the histograms created by ANALYZE. Possible values are: SINGLE_PREC_HB - single precision height-balanced, DOUBLE_PREC_HB - double precision - height-balanced. + height-balanced, JSON_HB - height-balanced, stored as + JSON. --host-cache-size=# How many host names should be cached to avoid resolving. (Automatically configured unless set explicitly) --idle-readonly-transaction-timeout=# diff --git a/mysql-test/main/statistics_json.result b/mysql-test/main/statistics_json.result index 8a434e891fc..1edfa474453 100644 --- a/mysql-test/main/statistics_json.result +++ b/mysql-test/main/statistics_json.result @@ -7940,3 +7940,9 @@ test.t1 analyze status OK SELECT * FROM t1 WHERE f > 'qux'; f DROP TABLE t1; +# +# MDEV-26737: Outdated VARIABLE_COMMENT for HISTOGRAM_TYPE in I_S.SYSTEM_VARIABLES +# +select variable_comment from information_schema.system_variables where VARIABLE_NAME='HISTOGRAM_TYPE'; +variable_comment +Specifies type of the histograms created by ANALYZE. Possible values are: SINGLE_PREC_HB - single precision height-balanced, DOUBLE_PREC_HB - double precision height-balanced, JSON_HB - height-balanced, stored as JSON. diff --git a/mysql-test/main/statistics_json.test b/mysql-test/main/statistics_json.test index 51ca9fe24f1..878c1344d8f 100644 --- a/mysql-test/main/statistics_json.test +++ b/mysql-test/main/statistics_json.test @@ -242,3 +242,8 @@ ANALYZE TABLE t1 PERSISTENT FOR ALL; SELECT * FROM t1 WHERE f > 'qux'; DROP TABLE t1; +--echo # +--echo # MDEV-26737: Outdated VARIABLE_COMMENT for HISTOGRAM_TYPE in I_S.SYSTEM_VARIABLES +--echo # +select variable_comment from information_schema.system_variables where VARIABLE_NAME='HISTOGRAM_TYPE'; + diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 7127cbc00f6..447c1f07310 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -6496,7 +6496,8 @@ static Sys_var_enum Sys_histogram_type( "Specifies type of the histograms created by ANALYZE. " "Possible values are: " "SINGLE_PREC_HB - single precision height-balanced, " - "DOUBLE_PREC_HB - double precision height-balanced.", + "DOUBLE_PREC_HB - double precision height-balanced, " + "JSON_HB - height-balanced, stored as JSON.", SESSION_VAR(histogram_type), CMD_LINE(REQUIRED_ARG), histogram_types, DEFAULT(1));