Commit f214d365 authored by Sergei Golubchik's avatar Sergei Golubchik

ASAN error in is_stat_table()

don't memcmp beyond the first argument's end

Also:
  use my_strcasecmp(table_alias_charset), like elsewhere, not memcmp
parent 9989c26b
...@@ -3990,11 +3990,11 @@ bool is_stat_table(const char *db, const char *table) ...@@ -3990,11 +3990,11 @@ bool is_stat_table(const char *db, const char *table)
{ {
DBUG_ASSERT(db && table); DBUG_ASSERT(db && table);
if (!memcmp(db, stat_tables_db_name.str, stat_tables_db_name.length)) if (!my_strcasecmp(table_alias_charset, db, stat_tables_db_name.str))
{ {
for (uint i= 0; i < STATISTICS_TABLES; i ++) for (uint i= 0; i < STATISTICS_TABLES; i ++)
{ {
if (!memcmp(table, stat_table_name[i].str, stat_table_name[i].length)) if (!my_strcasecmp(table_alias_charset, table, stat_table_name[i].str))
return true; return true;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment