Navigation Menu

Skip to content

Commit

Permalink
[wrapper][multiple-column-index] support update. refs #1031
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jul 22, 2011
1 parent bcc486c commit fb60ea6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ha_mroonga.cc
Expand Up @@ -3025,7 +3025,7 @@ int ha_mroonga::wrapper_update_row_index(const uchar *old_data, uchar *new_data)
field->move_field_offset(-ptr_diff);

grn_rc rc;
rc = grn_column_index_update(ctx, index_column, record_id, 1,
rc = grn_column_index_update(ctx, index_column, record_id, j + 1,
&old_value, &new_value);
if (rc) {
error = ER_ERROR_ON_WRITE;
Expand Down
Expand Up @@ -22,16 +22,16 @@ diaries CREATE TABLE `diaries` (
insert into diaries values(1, "Hello", "はじめました。");
insert into diaries values(2, "天気", "明日の富士山の天気について");
insert into diaries values(3, "富士山", "今日もきれい。");
update diaries set title = "チョモランマと富士山" where id = 1;
update diaries set title = "チョモランマ" where id = 3;
update diaries set content = "チョモランマと富士山" where id = 1;
select * from diaries where match(title, content) against("富士山");
id title content
1 チョモランマと富士山 はじめました。
1 Hello チョモランマと富士山
2 天気 明日の富士山の天気について
select * from diaries where match(title) against("富士山");
id title content
1 チョモランマと富士山 はじめました。
select * from diaries where match(content) against("富士山");
id title content
1 Hello チョモランマと富士山
2 天気 明日の富士山の天気について
drop table diaries;
Expand Up @@ -33,8 +33,8 @@ show create table diaries;
insert into diaries values(1, "Hello", "はじめました。");
insert into diaries values(2, "天気", "明日の富士山の天気について");
insert into diaries values(3, "富士山", "今日もきれい。");
update diaries set title = "チョモランマと富士山" where id = 1;
update diaries set title = "チョモランマ" where id = 3;
update diaries set content = "チョモランマと富士山" where id = 1;
select * from diaries where match(title, content) against("富士山");
select * from diaries where match(title) against("富士山");
select * from diaries where match(content) against("富士山");
Expand Down

0 comments on commit fb60ea6

Please sign in to comment.