Commit ca4935e6 authored by unknown's avatar unknown

BUG#14194: Problem with fulltext boolean search and apostrophe

Fixed that single apostrophe was considered as a word character.


mysql-test/r/fulltext.result:
  A test case for BUG#14194 added.
mysql-test/t/fulltext.test:
  A test case for BUG#14194 added.
storage/myisam/ftdefs.h:
  Fixed that single apostrophe was considered as a word character.
parent b358c5cb
......@@ -436,4 +436,8 @@ testword''
SELECT a FROM t1 WHERE MATCH a AGAINST('testword\'\'' IN BOOLEAN MODE);
a
testword''
INSERT INTO t1 VALUES('test\'s');
SELECT a FROM t1 WHERE MATCH a AGAINST('test' IN BOOLEAN MODE);
a
test's
DROP TABLE t1;
......@@ -355,6 +355,12 @@ 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);
#
# BUG#14194: Problem with fulltext boolean search and apostrophe
#
INSERT INTO t1 VALUES('test\'s');
SELECT a FROM t1 WHERE MATCH a AGAINST('test' IN BOOLEAN MODE);
DROP TABLE t1;
# End of 4.1 tests
......@@ -25,7 +25,7 @@
#include <plugin.h>
#define true_word_char(s,X) (my_isalnum(s,X) || (X)=='_')
#define misc_word_char(X) ((X)=='\'')
#define misc_word_char(X) 0
#define word_char(s,X) (true_word_char(s,X) || misc_word_char(X))
#define FT_MAX_WORD_LEN_FOR_SORT 31
......
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