Navigation Menu

Skip to content

Commit

Permalink
added test code for fulltext.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetsuro IKEDA committed Jun 21, 2010
1 parent 0041e88 commit 62e8c3e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/sql/r/fulltext.result
Expand Up @@ -53,4 +53,21 @@ c1 c2 c3
1 10 aa ii uu ee oo
5 50 aa ii uu ee oo
drop table t1;
set names utf8;
create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8;
insert into t1 values(1, "明日の富士山の天気について","あああああああ");
insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません");
insert into t1 values(3, "dummy", "dummy");
select * from t1;
c1 c2 c3
1 明日の富士山の天気について あああああああ
2 いいいいい 明日の富士山の天気は分かりません
3 dummy dummy
select * from t1 where match(c2) against("富士山");
c1 c2 c3
1 明日の富士山の天気について あああああああ
select * from t1 where match(c3) against("富士山");
c1 c2 c3
2 いいいいい 明日の富士山の天気は分かりません
drop table t1;
uninstall plugin mroonga;
10 changes: 10 additions & 0 deletions test/sql/t/fulltext.test
Expand Up @@ -27,6 +27,16 @@ select * from t1 where match(c3) against("+su" in boolean mode);
select * from t1 where match(c3) against("+ii" in boolean mode);
drop table t1;

set names utf8;
create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8;
insert into t1 values(1, "明日の富士山の天気について","あああああああ");
insert into t1 values(2, "いいいいい","明日の富士山の天気は分かりません");
insert into t1 values(3, "dummy", "dummy");
select * from t1;
select * from t1 where match(c2) against("富士山");
select * from t1 where match(c3) against("富士山");
drop table t1;

--disable_warnings
uninstall plugin mroonga;
--enable_warnings

0 comments on commit 62e8c3e

Please sign in to comment.