diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 23:27:33 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 23:27:33 +0200 |
commit | 775e82638b825747a2a8b7cf7d6d29c872693422 (patch) | |
tree | 7cb178d1273c5d993544b881a6bb93a33f75cfac /sql/sql_show.cc | |
parent | c7eead7a965b33fbad5099c927d2bb0723725bf3 (diff) | |
download | mariadb-git-775e82638b825747a2a8b7cf7d6d29c872693422.tar.gz |
put status variables in the proper pluginname_ scope
(but support the scopeless mysql style too).
always output status/system variables in the correct lettercase
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index eea1289015a..ac71837def4 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2626,7 +2626,7 @@ static bool status_vars_inited= 0; C_MODE_START static int show_var_cmp(const void *var1, const void *var2) { - return strcmp(((SHOW_VAR*)var1)->name, ((SHOW_VAR*)var2)->name); + return strcasecmp(((SHOW_VAR*)var1)->name, ((SHOW_VAR*)var2)->name); } C_MODE_END @@ -2831,6 +2831,17 @@ static bool show_status_array(THD *thd, const char *wild, name_buffer[sizeof(name_buffer)-1]=0; /* Safety */ if (ucase_names) my_caseup_str(system_charset_info, name_buffer); + else + { + my_casedn_str(system_charset_info, name_buffer); + DBUG_ASSERT(name_buffer[0] >= 'a'); + DBUG_ASSERT(name_buffer[0] <= 'z'); + + /* traditionally status variables have a first letter uppercased */ + if (status_var) + name_buffer[0]-= 'a' - 'A'; + } + restore_record(table, s->default_values); table->field[0]->store(name_buffer, strlen(name_buffer), |