Commit ca4935e6 authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
+6 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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