MDEV-18867 Long Time to Stop and Start

- Addressing ASAN failure in fts_check_aux_table()
parent 224c9504
...@@ -5804,12 +5804,13 @@ bool fts_check_aux_table(const char *name, ...@@ -5804,12 +5804,13 @@ bool fts_check_aux_table(const char *name,
/* First search the common table suffix array. */ /* First search the common table suffix array. */
for (ulint i = 0; fts_common_tables[i]; ++i) 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; return true;
} }
/* Could be obsolete common tables. */ /* 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; return true;
const char* index_id_ptr= ptr; const char* index_id_ptr= ptr;
...@@ -5836,7 +5837,7 @@ bool fts_check_aux_table(const char *name, ...@@ -5836,7 +5837,7 @@ bool fts_check_aux_table(const char *name,
} }
/* Other FT index specific table(s). */ /* Other FT index specific table(s). */
if (!memcmp(ptr, "DOC_ID", len)) if (len == 6 && !memcmp(ptr, "DOC_ID", len))
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