Commit 31c59cb4 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

support longer input.

parent 1b66506e
...@@ -172,7 +172,7 @@ char *stem_word(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *l ...@@ -172,7 +172,7 @@ char *stem_word(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *l
if (b != c) { if (b != c) {
stemmed = sb_stemmer_stem(stemmer, (const sb_symbol*)b, c-b); stemmed = sb_stemmer_stem(stemmer, (const sb_symbol*)b, c-b);
len = strlen((char *)stemmed); len = strlen((char *)stemmed);
if (*length + len > 254) break; if (*length + len >= 32767) break;
if (r != result) { if (r != result) {
*r = ' '; *r = ' ';
......
...@@ -18,3 +18,6 @@ Xxx Yyys Zzzer ...@@ -18,3 +18,6 @@ Xxx Yyys Zzzer
SELECT stem_word("english", "a"); SELECT stem_word("english", "a");
stem_word("english", "a") stem_word("english", "a")
a a
SELECT stem_word("english", "read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading") as long_stem_result;
long_stem_result
read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read read
...@@ -21,3 +21,4 @@ SELECT stem_word("dutch", "deuren boekjes;stuiter stuiteren auto's"); ...@@ -21,3 +21,4 @@ SELECT stem_word("dutch", "deuren boekjes;stuiter stuiteren auto's");
SELECT stem_word("english", "cars#bars#opening"); SELECT stem_word("english", "cars#bars#opening");
SELECT stem_word("xyz", "Xxx Yyys Zzzer"); SELECT stem_word("xyz", "Xxx Yyys Zzzer");
SELECT stem_word("english", "a"); SELECT stem_word("english", "a");
SELECT stem_word("english", "read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading read reads reading") as long_stem_result;
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