Commit 556f058a authored by Sergei Golubchik's avatar Sergei Golubchik

ASAN error when strlen(db) < 6

parent c47c0ca5
......@@ -324,7 +324,8 @@ TABLE_SHARE *alloc_table_share(const char *db, const char *table_name,
share->can_do_row_logging= 1;
if (share->table_category == TABLE_CATEGORY_LOG)
share->no_replicate= 1;
if (my_strnncoll(table_alias_charset, (uchar*) db, 6,
if (key_length > 6 &&
my_strnncoll(table_alias_charset, (const uchar*) key, 6,
(const uchar*) "mysql", 6) == 0)
share->not_usable_by_query_cache= 1;
......
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