BUG#31950 - repair table hangs while processing multicolumn utf8

            fulltext index

Having a table with broken multibyte characters may cause fulltext
parser dead-loop.

Since normally it is not possible to insert broken multibyte sequence
into a table, this problem may arise only if table is damaged.

Affected statements are:
- CHECK/REPAIR against damaged table with fulltext index;
- boolean mode phrase search against damaged table with or
  without fulltext inex;
- boolean mode searches without index;
- nlq searches.

No test case for this fix. Affects 5.0 only.
parent f9fc31f9
...@@ -188,7 +188,7 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, const byte *end, ...@@ -188,7 +188,7 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, const byte *end,
do do
{ {
for (;; doc+= mbl) for (;; doc+= (mbl ? mbl : 1))
{ {
if (doc >= end) DBUG_RETURN(0); if (doc >= end) DBUG_RETURN(0);
if (true_word_char(cs, *doc)) break; if (true_word_char(cs, *doc)) break;
......
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