Commit 1b66506e authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix one character input case.

parent 617e93cb
......@@ -140,7 +140,7 @@ char *stem_word(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *l
int len;
char *r, *e, *b, *c;
if (!args->args[1] || args->lengths[1] == 1) {
if (!args->args[1]) {
*is_null=1;
return 0;
}
......@@ -167,7 +167,6 @@ char *stem_word(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *l
e = c + args->lengths[1];
int i=0;
for(; c <= e ;c++){
if(c == e || (*c >= 0 && *c <= 38) || (*c >= 40 && *c <= 47) || (*c >= 58 && *c <= 64) || (*c >= 91 && *c <= 96) || (*c >= 123 && *c <= 126)) {
if (b != c) {
......
......@@ -15,3 +15,6 @@ car bar open
SELECT stem_word("xyz", "Xxx Yyys Zzzer");
stem_word("xyz", "Xxx Yyys Zzzer")
Xxx Yyys Zzzer
SELECT stem_word("english", "a");
stem_word("english", "a")
a
......@@ -20,3 +20,4 @@ SELECT stem_word("dutch", "deuren");
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");
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