Skip to content
Permalink
Browse files
MDEV-18867 Long Time to Stop and Start
- Addressing ASAN failure in fts_check_aux_table()
  • Loading branch information
Thirunarayanan committed Sep 11, 2020
1 parent 224c950 commit bfd1ed5
Showing 1 changed file with 4 additions and 3 deletions.
@@ -5804,12 +5804,13 @@ bool fts_check_aux_table(const char *name,
/* First search the common table suffix array. */
for (ulint i = 0; fts_common_tables[i]; ++i)
{
if (!memcmp(ptr, fts_common_tables[i], len))
if (!strncmp(ptr, fts_common_tables[i], len))
return true;
}

/* Could be obsolete common tables. */
if (!memcmp(ptr, "ADDED", len) || !memcmp(ptr, "STOPWORDS", len))
if ((len == 5 && !memcmp(ptr, "ADDED", len)) ||
(len == 9 && !memcmp(ptr, "STOPWORDS", len)))
return true;

const char* index_id_ptr= ptr;
@@ -5836,7 +5837,7 @@ bool fts_check_aux_table(const char *name,
}

/* Other FT index specific table(s). */
if (!memcmp(ptr, "DOC_ID", len))
if (len == 6 && !memcmp(ptr, "DOC_ID", len))
return true;
}

0 comments on commit bfd1ed5

Please sign in to comment.