summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--myisam/ft_parser.c4
-rw-r--r--mysql-test/r/fulltext.result3
-rw-r--r--mysql-test/t/fulltext.test1
3 files changed, 7 insertions, 1 deletions
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c
index 9198f89ee35..6e79696bd6e 100644
--- a/myisam/ft_parser.c
+++ b/myisam/ft_parser.c
@@ -149,8 +149,10 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
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++)
+ else if (!misc_word_char(*doc) || mwc)
break;
+ else
+ mwc++;
param->prev='A'; /* be sure *prev is true_word_char */
word->len= (uint)(doc-word->pos) - mwc;
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index f0d323670e0..7e2e0a56212 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -433,4 +433,7 @@ INSERT INTO t1 VALUES('testword\'\'');
SELECT a FROM t1 WHERE MATCH a AGAINST('testword' IN BOOLEAN MODE);
a
testword''
+SELECT a FROM t1 WHERE MATCH a AGAINST('testword\'\'' IN BOOLEAN MODE);
+a
+testword''
DROP TABLE t1;
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index b52c5d0ec08..ea92ec944ed 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -354,6 +354,7 @@ SET myisam_repair_threads=@@global.myisam_repair_threads;
#
INSERT INTO t1 VALUES('testword\'\'');
SELECT a FROM t1 WHERE MATCH a AGAINST('testword' IN BOOLEAN MODE);
+SELECT a FROM t1 WHERE MATCH a AGAINST('testword\'\'' IN BOOLEAN MODE);
DROP TABLE t1;
# End of 4.1 tests