[Groonga-mysql-commit] mroonga/mroonga [master] add tests about multiple column index in wrapper mode. refs #1031

Back to archive index

null+****@clear***** null+****@clear*****
2011年 7月 5日 (火) 00:07:26 JST


Kouhei Sutou	2011-07-04 15:07:26 +0000 (Mon, 04 Jul 2011)

  New Revision: 38f113b0d8f509facb9159d5c9611fd248b02036

  Log:
    add tests about multiple column index in wrapper mode. refs #1031

  Added files:
    test/sql/r/fulltext_multiple_column_index_wrapper.result
    test/sql/t/fulltext_multiple_column_index_wrapper.test
  Modified files:
    test/sql/r/Makefile.am

  Modified: test/sql/r/Makefile.am (+3 -0)
===================================================================
--- test/sql/r/Makefile.am    2011-07-04 14:38:24 +0000 (d695525)
+++ test/sql/r/Makefile.am    2011-07-04 15:07:26 +0000 (c6a4cec)
@@ -7,10 +7,12 @@ EXTRA_DIST = \
 	create_table.result \
 	create_table_wrapper.result \
 	delete.result \
+	delete_wrapper.result \
 	drop_database.result \
 	drop_table.result \
 	flush_logs.result \
 	fulltext.result \
+	fulltext_multiple_column_index_wrapper.result \
 	fulltext_wrapper.result \
 	hash.result \
 	information_schema.result \
@@ -27,4 +29,5 @@ EXTRA_DIST = \
 	show_table_status.result \
 	tinyint.result \
 	update.result \
+	update_wrapper.result \
 	$(NULL)

  Added: test/sql/r/fulltext_multiple_column_index_wrapper.result (+26 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/r/fulltext_multiple_column_index_wrapper.result    2011-07-04 15:07:26 +0000 (2c0d242)
@@ -0,0 +1,26 @@
+set names utf8;
+create table diaries (
+  id int primary key,
+  title varchar(255),
+  content text,
+  fulltext index(title, content)
+) default charset utf8 COMMENT = 'engine "innodb"';
+insert into diaries values(1, "Hello", "はじめました。");
+insert into diaries values(2, "天気", "明日の富士山の天気について");
+insert into diaries values(3, "富士山", "今日もきれい。");
+select * from diaries;
+id	title	content
+1	Hello	はじめました
+2	天気	明日の富士山の天気について
+3	富士山	今日もきれい。
+select * from diaries where match(title, content) against("富士山");
+id	title	content
+2	天気	明日の富士山の天気について
+3	富士山	今日もきれい。
+select * from diaries where match(title) against("富士山");
+id	title	content
+3	富士山	今日もきれい。
+select * from diaries where match(content) against("富士山");
+id	title	content
+2	天気	明日の富士山の天気について
+drop table diaries;

  Added: test/sql/t/fulltext_multiple_column_index_wrapper.test (+40 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/t/fulltext_multiple_column_index_wrapper.test    2011-07-04 15:07:26 +0000 (a9be016)
@@ -0,0 +1,40 @@
+# Copyright(C) 2011 Kouhei Sutou <kou****@clear*****>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+--source suite/groonga/include/groonga.inc
+
+--disable_warnings
+drop table if exists diaries;
+--enable_warnings
+
+set names utf8;
+create table diaries (
+  id int primary key,
+  title varchar(255),
+  content text,
+  fulltext index (title, content)
+) default charset utf8 COMMENT = 'engine "innodb"';
+show create table diaries;
+insert into diaries values(1, "Hello", "はじめました。");
+insert into diaries values(2, "天気", "明日の富士山の天気について");
+insert into diaries values(3, "富士山", "今日もきれい。");
+select * from diaries;
+select * from diaries where match(title, content) against("富士山");
+select * from diaries where match(title) against("富士山");
+select * from diaries where match(content) against("富士山");
+drop table diaries;
+
+--source suite/groonga/include/groonga_deinit.inc




Groonga-mysql-commit メーリングリストの案内
Back to archive index