summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-09-28 18:04:26 +0200
committerSergei Golubchik <serg@mariadb.org>2018-09-28 18:04:26 +0200
commit556f058ab27721658bdeb86f6d8f2dd30d873b64 (patch)
treea09fb39f651b3f4734a2e5fa3f5f6b2f13af3a6e /sql/table.cc
parentc47c0ca50c48cda89128cd28c39f25da50036838 (diff)
downloadmariadb-git-556f058ab27721658bdeb86f6d8f2dd30d873b64.tar.gz
ASAN error when strlen(db) < 6
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 7ec2a22cbbb..4b2c88cc0e9 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -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;