mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user