Skip to content

Commit 27c0952

Browse files
author
Nirbhay Choubey
committed
MDEV#5790 : SHOW GLOBAL STATUS LIKE does not show
the correct list of variables when using "_" Fixed the type for offending "wsrep", wrongly set to SHOW_SIMPLE_FUNC. Added a test case.
1 parent 87910f7 commit 27c0952

File tree

4 files changed

+107
-1
lines changed

4 files changed

+107
-1
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#
2+
# MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
3+
# variables when using "_"
4+
#
5+
CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
6+
SHOW VARIABLES LIKE 'wsrep%';
7+
Variable_name Value
8+
wsrep_osu_method #
9+
wsrep_auto_increment_control #
10+
wsrep_causal_reads #
11+
wsrep_certify_nonpk #
12+
wsrep_cluster_address #
13+
wsrep_cluster_name #
14+
wsrep_convert_lock_to_trx #
15+
wsrep_data_home_dir #
16+
wsrep_dbug_option #
17+
wsrep_debug #
18+
wsrep_desync #
19+
wsrep_drupal_282555_workaround #
20+
wsrep_forced_binlog_format #
21+
wsrep_load_data_splitting #
22+
wsrep_log_conflicts #
23+
wsrep_max_ws_rows #
24+
wsrep_max_ws_size #
25+
wsrep_mysql_replication_bundle #
26+
wsrep_node_address #
27+
wsrep_node_incoming_address #
28+
wsrep_node_name #
29+
wsrep_notify_cmd #
30+
wsrep_on #
31+
wsrep_provider #
32+
wsrep_provider_options #
33+
wsrep_recover #
34+
wsrep_replicate_myisam #
35+
wsrep_retry_autocommit #
36+
wsrep_slave_threads #
37+
wsrep_sst_auth #
38+
wsrep_sst_donor #
39+
wsrep_sst_donor_rejects_queries #
40+
wsrep_sst_method #
41+
wsrep_sst_receive_address #
42+
wsrep_start_position #
43+
44+
SHOW VARIABLES LIKE 'wsrep_%';
45+
Variable_name Value
46+
wsrep_osu_method #
47+
wsrep_auto_increment_control #
48+
wsrep_causal_reads #
49+
wsrep_certify_nonpk #
50+
wsrep_cluster_address #
51+
wsrep_cluster_name #
52+
wsrep_convert_lock_to_trx #
53+
wsrep_data_home_dir #
54+
wsrep_dbug_option #
55+
wsrep_debug #
56+
wsrep_desync #
57+
wsrep_drupal_282555_workaround #
58+
wsrep_forced_binlog_format #
59+
wsrep_load_data_splitting #
60+
wsrep_log_conflicts #
61+
wsrep_max_ws_rows #
62+
wsrep_max_ws_size #
63+
wsrep_mysql_replication_bundle #
64+
wsrep_node_address #
65+
wsrep_node_incoming_address #
66+
wsrep_node_name #
67+
wsrep_notify_cmd #
68+
wsrep_on #
69+
wsrep_provider #
70+
wsrep_provider_options #
71+
wsrep_recover #
72+
wsrep_replicate_myisam #
73+
wsrep_retry_autocommit #
74+
wsrep_slave_threads #
75+
wsrep_sst_auth #
76+
wsrep_sst_donor #
77+
wsrep_sst_donor_rejects_queries #
78+
wsrep_sst_method #
79+
wsrep_sst_receive_address #
80+
wsrep_start_position #
81+
# Should show nothing.
82+
SHOW VARIABLES LIKE 'x';
83+
Variable_name Value
84+
# End of test.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--binlog-format=row --wsrep-provider=/usr/lib/galera/libgalera_smm.so --wsrep-cluster-address=gcomm://
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--source include/have_wsrep.inc
2+
3+
--echo #
4+
--echo # MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
5+
--echo # variables when using "_"
6+
--echo #
7+
8+
CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
9+
10+
--replace_column 2 #
11+
SHOW VARIABLES LIKE 'wsrep%';
12+
13+
--echo
14+
--replace_column 2 #
15+
SHOW VARIABLES LIKE 'wsrep_%';
16+
17+
--echo # Should show nothing.
18+
SHOW VARIABLES LIKE 'x';
19+
20+
--echo # End of test.
21+

sql/mysqld.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8691,7 +8691,7 @@ SHOW_VAR status_vars[]= {
86918691
{"wsrep_provider_name", (char*) &wsrep_provider_name, SHOW_CHAR_PTR},
86928692
{"wsrep_provider_version", (char*) &wsrep_provider_version, SHOW_CHAR_PTR},
86938693
{"wsrep_provider_vendor", (char*) &wsrep_provider_vendor, SHOW_CHAR_PTR},
8694-
{"wsrep", (char*) &wsrep_show_status, SHOW_SIMPLE_FUNC},
8694+
{"wsrep", (char*) &wsrep_show_status, SHOW_FUNC},
86958695
#endif
86968696
{NullS, NullS, SHOW_LONG}
86978697
};

0 commit comments

Comments
 (0)