diff options
author | unknown <serg@sergbook.mysql.com> | 2002-06-28 15:18:45 +0200 |
---|---|---|
committer | unknown <serg@sergbook.mysql.com> | 2002-06-28 15:18:45 +0200 |
commit | 5b2adf3f5f1d349907d4ca8575d313296f643068 (patch) | |
tree | d87daba559aa43d0cd4854f33949be641f2f8cb7 | |
parent | ea01d6572a9d8187dcf70753d5bc420a9c2e139b (diff) | |
download | mariadb-git-5b2adf3f5f1d349907d4ca8575d313296f643068.tar.gz |
parser bug of "phrase search" fixed
-rw-r--r-- | myisam/ft_parser.c | 4 | ||||
-rw-r--r-- | mysql-test/r/fulltext.result | 2 | ||||
-rw-r--r-- | mysql-test/t/fulltext.test | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c index 944b9efb35a..283216762e1 100644 --- a/myisam/ft_parser.c +++ b/myisam/ft_parser.c @@ -125,7 +125,7 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param) byte *doc=*start; int mwc; - param->yesno=(FTB_YES==' ')?1:0; + param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0); param->plusminus=param->pmsign=0; while (doc<end) @@ -156,7 +156,7 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param) if (*doc == FTB_NEG ) { param->pmsign=!param->pmsign; continue; } } param->prev=*doc; - param->yesno=(param->quot != 0); + param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0); param->plusminus=param->pmsign=0; } diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index f5e65c5103b..b312f5fbc3d 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -70,6 +70,8 @@ Full-text search in MySQL implements vector space model 0 select * from t1 where MATCH a,b AGAINST ("+call* +coll*" IN BOOLEAN MODE); a b Full-text indexes are called collections +select * from t1 where MATCH a,b AGAINST ('"support now"' IN BOOLEAN MODE); +a b select * from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE); a b MySQL has now support for full-text search diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 4093f06d627..65d5381d725 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -35,6 +35,7 @@ select *, MATCH(a,b) AGAINST("collections support" IN BOOLEAN MODE) as x from t1 select * from t1 where MATCH a,b AGAINST ("+call* +coll*" IN BOOLEAN MODE); +select * from t1 where MATCH a,b AGAINST ('"support now"' IN BOOLEAN MODE); select * from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE); select * from t1 where MATCH a,b AGAINST ('"text search" "now support"' IN BOOLEAN MODE); select * from t1 where MATCH a,b AGAINST ('"text search" -"now support"' IN BOOLEAN MODE); |