[Groonga-mysql-commit] mroonga/mroonga [master] [wrapper][multiple-column-index] fix test. refs #1031

Back to archive index

null+****@clear***** null+****@clear*****
2011年 7月 14日 (木) 19:28:26 JST


Kouhei Sutou	2011-07-14 10:28:26 +0000 (Thu, 14 Jul 2011)

  New Revision: dea2813dd4806758111a0afc541f397ce25edad5

  Log:
    [wrapper][multiple-column-index] fix test. refs #1031
    
    MySQL requires all keys for MATCH().
    
    Now test is passed but why? We don't support multiple column index yet...

  Modified files:
    test/sql/groonga_wrapper/r/fulltext_multiple_column_index.result
    test/sql/groonga_wrapper/t/fulltext_multiple_column_index.test

  Modified: test/sql/groonga_wrapper/r/fulltext_multiple_column_index.result (+19 -5)
===================================================================
--- test/sql/groonga_wrapper/r/fulltext_multiple_column_index.result    2011-07-14 09:26:17 +0000 (2c0d242)
+++ test/sql/groonga_wrapper/r/fulltext_multiple_column_index.result    2011-07-14 10:28:26 +0000 (1294896)
@@ -1,16 +1,30 @@
+drop table if exists diaries;
 set names utf8;
 create table diaries (
-  id int primary key,
-  title varchar(255),
-  content text,
-  fulltext index(title, content)
+id int primary key,
+title varchar(255),
+content text,
+fulltext index (title, content),
+fulltext index (title),
+fulltext index (content)
 ) default charset utf8 COMMENT = 'engine "innodb"';
+show create table diaries;
+Table	Create Table
+diaries	CREATE TABLE `diaries` (
+  `id` int(11) NOT NULL,
+  `title` varchar(255) DEFAULT NULL,
+  `content` text,
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `title` (`title`,`content`),
+  FULLTEXT KEY `title_2` (`title`),
+  FULLTEXT KEY `content` (`content`)
+) ENGINE=groonga 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	はじめました
+1	Hello	はじめました。
 2	天気	明日の富士山の天気について
 3	富士山	今日もきれい。
 select * from diaries where match(title, content) against("富士山");

  Modified: test/sql/groonga_wrapper/t/fulltext_multiple_column_index.test (+3 -1)
===================================================================
--- test/sql/groonga_wrapper/t/fulltext_multiple_column_index.test    2011-07-14 09:26:17 +0000 (fcdfca5)
+++ test/sql/groonga_wrapper/t/fulltext_multiple_column_index.test    2011-07-14 10:28:26 +0000 (415be49)
@@ -25,7 +25,9 @@ create table diaries (
   id int primary key,
   title varchar(255),
   content text,
-  fulltext index (title, content)
+  fulltext index (title, content),
+  fulltext index (title),
+  fulltext index (content)
 ) default charset utf8 COMMENT = 'engine "innodb"';
 show create table diaries;
 insert into diaries values(1, "Hello", "はじめました。");




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