mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MariaRocks: fix a bug in MariaDB: SHOW STATUS LIKE shows extra rows
SHOW STATUS LIKE 'pattern' returned Rocksdb_XXX status variables that had SHOW_FUNC type but didn't match the pattern (for example Rocksdb_block_cache_add). Among other things, this caused MTR to assume that each testcase has damaged the execution environment. The issue was a unitialized variable and then a typo in the condition that checks if variable name matches the pattern.
This commit is contained in:
@ -3394,7 +3394,7 @@ static bool show_status_array(THD *thd, const char *wild,
|
||||
|
||||
for (; variables->name; variables++)
|
||||
{
|
||||
bool wild_checked;
|
||||
bool wild_checked= false;
|
||||
strnmov(prefix_end, variables->name, len);
|
||||
name_buffer[sizeof(name_buffer)-1]=0; /* Safety */
|
||||
|
||||
@ -3460,8 +3460,8 @@ static bool show_status_array(THD *thd, const char *wild,
|
||||
else
|
||||
{
|
||||
if ((wild_checked ||
|
||||
(wild && wild[0] && wild_case_compare(system_charset_info,
|
||||
name_buffer, wild))) &&
|
||||
!(wild && wild[0] && wild_case_compare(system_charset_info,
|
||||
name_buffer, wild))) &&
|
||||
(!cond || cond->val_int()))
|
||||
{
|
||||
const char *pos; // We assign a lot of const's
|
||||
|
Reference in New Issue
Block a user