Navigation Menu

Skip to content

Commit

Permalink
[wrapper][multiple-column-index] fix test. refs #1031
Browse files Browse the repository at this point in the history
MySQL requires all keys for MATCH().

Now test is passed but why? We don't support multiple column index yet...
  • Loading branch information
kou committed Jul 14, 2011
1 parent 121e2cd commit dea2813
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
24 changes: 19 additions & 5 deletions test/sql/groonga_wrapper/r/fulltext_multiple_column_index.result
@@ -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("富士山");
Expand Down
Expand Up @@ -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", "はじめました。");
Expand Down

0 comments on commit dea2813

Please sign in to comment.