ASAN error when strlen(db) < 6

This commit is contained in:
Sergei Golubchik 2018-09-28 18:04:26 +02:00
parent c47c0ca50c
commit 556f058ab2

View file

@ -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;