Tetsuro IKEDA
null+****@clear*****
Thu Oct 4 10:40:29 JST 2012
Tetsuro IKEDA 2010-06-21 18:07:34 +0900 (Mon, 21 Jun 2010) New Revision: 62e8c3e76dbdae28874616211e6d3be351896064 https://github.com/mroonga/mroonga/commit/62e8c3e76dbdae28874616211e6d3be351896064 Log: added test code for fulltext. Modified files: test/sql/r/fulltext.result test/sql/t/fulltext.test Modified: test/sql/r/fulltext.result (+17 -0) =================================================================== --- test/sql/r/fulltext.result 2010-06-21 17:42:38 +0900 (ef0f0c7) +++ test/sql/r/fulltext.result 2010-06-21 18:07:34 +0900 (bc138bf) @@ -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; Modified: test/sql/t/fulltext.test (+10 -0) =================================================================== --- test/sql/t/fulltext.test 2010-06-21 17:42:38 +0900 (272a432) +++ test/sql/t/fulltext.test 2010-06-21 18:07:34 +0900 (4523a76) @@ -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 -------------- next part -------------- HTML����������������������������...Download