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
if (b != c) {
stemmed = sb_stemmer_stem(stemmer, (const sb_symbol*)b, c-b);
len = strlen((char *)stemmed);
if (*length + len > 254) break;
if (*length + len >= 32767) break;
if (r != result) {
*r = ' ';
......@@ -190,4 +190,4 @@ char *stem_word(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *l
}
return result;
}
\ No newline at end of file
}
......@@ -18,3 +18,6 @@ Xxx Yyys Zzzer
SELECT stem_word("english", "a");
stem_word("english", "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");
SELECT stem_word("english", "cars#bars#opening");
SELECT stem_word("xyz", "Xxx Yyys Zzzer");
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