summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-10-25 10:23:38 +0200
committerunknown <serg@serg.mylan>2004-10-25 10:23:38 +0200
commit37c37024834a8dce4d2b6528ac0e7271b12da162 (patch)
tree97f460137216dbaaa0ae09e7bd5a758fabe26c70 /myisam
parent9c300fe66c9713e912fc0b31c59415b8a7b617e9 (diff)
downloadmariadb-git-37c37024834a8dce4d2b6528ac0e7271b12da162.tar.gz
don't hang if the text contains illegal characters
Diffstat (limited to 'myisam')
-rw-r--r--myisam/ft_parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c
index b0fe180d0fb..543cf998a82 100644
--- a/myisam/ft_parser.c
+++ b/myisam/ft_parser.c
@@ -174,7 +174,7 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, byte *end,
FT_WORD *word)
{
byte *doc= *start;
- uint mwc, length;
+ uint mwc, length, mbl;
DBUG_ENTER("ft_simple_get_word");
while (doc<end)
@@ -185,7 +185,7 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, byte *end,
}
mwc= length= 0;
- for (word->pos=doc; doc<end; length++, doc+=my_mbcharlen(cs, *(uchar *)doc))
+ for (word->pos=doc; doc<end; length++, mbl=my_mbcharlen(cs, *(uchar *)doc), doc+=(mbl ? mbl : 1))
if (true_word_char(cs,*doc))
mwc= 0;
else if (!misc_word_char(*doc) || mwc++)