diff options
author | unknown <serg@serg.mylan> | 2003-10-20 21:32:49 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-10-20 21:32:49 +0200 |
commit | 293a61ed3538007531b8c3c4d6a5b6308e3e6b06 (patch) | |
tree | 47d3b8c63aeb7060366e5cbb33064b57ead7232b /myisam/ft_parser.c | |
parent | 228f4a43a353e9e7c56e1a617749fc9c0e875f6d (diff) | |
download | mariadb-git-293a61ed3538007531b8c3c4d6a5b6308e3e6b06.tar.gz |
oops forgot to commit ft_parser.c :-[]
myisam/ft_parser.c:
oops forgot to commit this file :-[]
Diffstat (limited to 'myisam/ft_parser.c')
-rw-r--r-- | myisam/ft_parser.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c index 2cd6afdcbc2..d6d1378bdae 100644 --- a/myisam/ft_parser.c +++ b/myisam/ft_parser.c @@ -83,7 +83,7 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end, FT_WORD *word, FTB_PARAM *param) { byte *doc=*start; - int mwc; + uint mwc, length; param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0); param->plusminus=param->pmsign=0; @@ -120,8 +120,8 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end, param->plusminus=param->pmsign=0; } - mwc=0; - for (word->pos=doc; doc<end; doc++) + mwc=length=0; + for (word->pos=doc; doc<end; length++, doc+=my_mbcharlen(cs, *(uchar *)doc)) if (true_word_char(cs,*doc)) mwc=0; else if (!misc_word_char(*doc) || mwc++) @@ -132,8 +132,8 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end, if ((param->trunc=(doc<end && *doc == FTB_TRUNC))) doc++; - if (((word->len >= ft_min_word_len && !is_stopword(word->pos, word->len)) - || param->trunc) && word->len < ft_max_word_len) + if (((length >= ft_min_word_len && !is_stopword(word->pos, word->len)) + || param->trunc) && length < ft_max_word_len) { *start=doc; return 1; @@ -146,7 +146,7 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, byte *end, FT_WORD *word) { byte *doc=*start; - int mwc; + uint mwc, length; DBUG_ENTER("ft_simple_get_word"); while (doc<end) @@ -156,8 +156,8 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, byte *end, if (true_word_char(cs,*doc)) break; } - mwc=0; - for(word->pos=doc; doc<end; doc++) + mwc=length=0; + for(word->pos=doc; doc<end; length++, doc+=my_mbcharlen(cs, *(uchar *)doc)) if (true_word_char(cs,*doc)) mwc=0; else if (!misc_word_char(*doc) || mwc++) @@ -165,7 +165,7 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, byte *end, word->len= (uint)(doc-word->pos) - mwc; - if (word->len >= ft_min_word_len && word->len < ft_max_word_len && + if (length >= ft_min_word_len && length < ft_max_word_len && !is_stopword(word->pos, word->len)) { *start=doc; |