Commit db4ef35a authored by unknown's avatar unknown

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.


myisam/ft_parser.c:
  When skipping leading spaces, skip broken characters as well (broken
  characters a identified by mbl == 0).
parent 0724eb88
......@@ -188,7 +188,7 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, const byte *end,
do
{
for (;; doc+= mbl)
for (;; doc+= (mbl ? mbl : 1))
{
if (doc >= end) DBUG_RETURN(0);
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