diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-04-16 13:04:03 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-04-16 13:04:03 -0400 |
commit | b11be0525527fb59f367d95744e8a422d2bddb98 (patch) | |
tree | 276036261b6218253efd90cc570101788104107c /sql/sql_show.cc | |
parent | eec6222a894a298376e2f2f0636d2b3f5719210e (diff) | |
download | mariadb-git-b11be0525527fb59f367d95744e8a422d2bddb98.tar.gz |
MDEV#6079: xtrabackup SST failing with maria-10.0-galera
Added logic to skip changing of case for wsrep status
variable names.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index dfc816090fd..4f2fccd01b1 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2947,11 +2947,39 @@ static bool show_status_array(THD *thd, const char *wild, *prefix_end++= '_'; len=name_buffer + sizeof(name_buffer) - prefix_end; +#ifdef WITH_WSREP + bool is_wsrep_var= FALSE; + /* + This is a workaround for lp:1306875 (PBX) to skip switching of wsrep + status variable name's first letter to uppercase. This is an optimization + for status variables defined under wsrep plugin. + TODO: remove once lp:1306875 has been addressed. + */ + if (*prefix && !my_strcasecmp(system_charset_info, prefix, "wsrep")) + { + is_wsrep_var= TRUE; + } +#endif /* WITH_WSREP */ + for (; variables->name; variables++) { bool wild_checked; strnmov(prefix_end, variables->name, len); name_buffer[sizeof(name_buffer)-1]=0; /* Safety */ + +#ifdef WITH_WSREP + /* + If the prefix is NULL, that means we are looking into the status variables + defined directly under mysqld.cc. Do not capitalize wsrep status variable + names until lp:1306875 has been fixed. + TODO: remove once lp:1306875 has been addressed. + */ + if (!(*prefix) && !strncasecmp(name_buffer, "wsrep", strlen("wsrep"))) + { + is_wsrep_var= TRUE; + } +#endif /* WITH_WSREP */ + if (ucase_names) my_caseup_str(system_charset_info, name_buffer); else @@ -2960,8 +2988,13 @@ static bool show_status_array(THD *thd, const char *wild, DBUG_ASSERT(name_buffer[0] >= 'a'); DBUG_ASSERT(name_buffer[0] <= 'z'); +#ifdef WITH_WSREP + // TODO: remove once lp:1306875 has been addressed. + if (status_var && (is_wsrep_var == FALSE)) +#else /* traditionally status variables have a first letter uppercased */ if (status_var) +#endif /* WITH_WSREP */ name_buffer[0]-= 'a' - 'A'; } |