From 05b3ff393ffed1d69e6ef7e5258d33280587c064 Mon Sep 17 00:00:00 2001 From: "serg@sergbook.mylan" <> Date: Sat, 8 Nov 2003 15:39:10 +0100 Subject: [PATCH] fulltext.test, fulltext.result: one simple trunc* test --- mysql-test/r/fulltext.result | 14 ++++++++++++++ mysql-test/t/fulltext.test | 10 ++++++++++ 2 files changed, 24 insertions(+) diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 737390865f1..8f1f90e9f76 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -134,6 +134,20 @@ Only MyISAM tables support collections Function MATCH ... AGAINST() is used to do a search some test foobar implements vector space model drop table t1; +create table t1 (a varchar(200) not null, fulltext (a)); +insert t1 values ("aaa10 bbb20"), ("aaa20 bbb15"), ("aaa30 bbb10"); +select * from t1 where match a against ("+aaa* +bbb*" in boolean mode); +a +aaa10 bbb20 +aaa20 bbb15 +aaa30 bbb10 +select * from t1 where match a against ("+aaa* +bbb1*" in boolean mode); +a +aaa20 bbb15 +aaa30 bbb10 +select * from t1 where match a against ("+aaa* +ccc*" in boolean mode); +a +drop table t1; CREATE TABLE t1 ( id int(11), ticket int(11), diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 387a36f1f52..e2293094258 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -70,6 +70,16 @@ delete from t1 where MATCH(a,b) AGAINST ("indexes"); select * from t1; drop table t1; +# +# why to scan strings for trunc* +# +create table t1 (a varchar(200) not null, fulltext (a)); +insert t1 values ("aaa10 bbb20"), ("aaa20 bbb15"), ("aaa30 bbb10"); +select * from t1 where match a against ("+aaa* +bbb*" in boolean mode); +select * from t1 where match a against ("+aaa* +bbb1*" in boolean mode); +select * from t1 where match a against ("+aaa* +ccc*" in boolean mode); +drop table t1; + # # Check bug reported by Matthias Urlichs #