Navigation Menu

Skip to content

Commit

Permalink
added workaround code for field manipulation assertions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetsuro IKEDA committed Apr 15, 2010
1 parent 6c8df44 commit ec94639
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ha_mroonga.cc
Expand Up @@ -808,6 +808,7 @@ int ha_mroonga::rnd_next(uchar *buf)
int n_columns = table->s->fields;
for (i=0; i < n_columns; i++) {
Field *field = table->field[i];
bitmap_set_bit(table->write_set, field->field_index);
mrn_store_field(ctx, field, col[i], row_id);
}
return 0;
Expand All @@ -820,6 +821,7 @@ int ha_mroonga::rnd_pos(uchar *buf, uchar *pos)
int n_columns = table->s->fields;
for (i=0; i < n_columns; i++) {
Field *field = table->field[i];
bitmap_set_bit(table->write_set, field->field_index);
mrn_store_field(ctx, field, col[i], row_id);
}
return 0;
Expand All @@ -842,6 +844,7 @@ int ha_mroonga::write_row(uchar *buf)
// surpose simgle column key
int field_no = key_info.key_part[0].field->field_index;
Field *pkey_field = table->field[field_no];
bitmap_set_bit(table->read_set, pkey_field->field_index);
mrn_set_buf(ctx, pkey_field, &wrapper, &pkey_size);
pkey = GRN_TEXT_VALUE(&wrapper);
}
Expand All @@ -860,6 +863,7 @@ int ha_mroonga::write_row(uchar *buf)
GRN_VOID_INIT(&colbuf);
for (i=0; i < n_columns; i++) {
Field *field = table->field[i];
bitmap_set_bit(table->read_set, field->field_index);
mrn_set_buf(ctx, field, &colbuf, &col_size);
if (grn_obj_set_value(ctx, col[i], row_id, &colbuf, GRN_OBJ_SET)
!= GRN_SUCCESS) {
Expand All @@ -879,6 +883,7 @@ int ha_mroonga::update_row(const uchar *old_data, uchar *new_data)
GRN_VOID_INIT(&colbuf);
for (i=0; i < n_columns; i++) {
Field *field = table->field[i];
bitmap_set_bit(table->read_set, field->field_index);
mrn_set_buf(ctx, field, &colbuf, &col_size);
if (grn_obj_set_value(ctx, col[i], row_id, &colbuf, GRN_OBJ_SET)
!= GRN_SUCCESS) {
Expand Down Expand Up @@ -966,6 +971,7 @@ int ha_mroonga::ft_read(uchar *buf)
int n_columns = table->s->fields;
for (i=0; i < n_columns; i++) {
Field *field = table->field[i];
bitmap_set_bit(table->write_set, field->field_index);
mrn_store_field(ctx, field, col[i], row_id);
}
return 0;
Expand Down

0 comments on commit ec94639

Please sign in to comment.