Navigation Menu

Skip to content

Commit

Permalink
Stop to create grn_ctx for each MATCH AGAINST
Browse files Browse the repository at this point in the history
Because one handler isn't used from multi threads. So we can use the
same grn_ctx for multi MATCH AGAINSTs.
  • Loading branch information
kou committed Oct 8, 2013
1 parent e43a5c2 commit fa0999f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ha_mroonga.cpp
Expand Up @@ -1599,7 +1599,6 @@ static void mrn_generic_ft_close_search(FT_INFO *handler)
grn_obj_unlink(info->ctx, info->score_column);
grn_obj_unlink(info->ctx, &(info->key));
grn_obj_unlink(info->ctx, &(info->score));
grn_ctx_fin(info->ctx);
delete info;
DBUG_VOID_RETURN;
}
Expand Down Expand Up @@ -7796,8 +7795,7 @@ struct st_mrn_ft_info *ha_mroonga::generic_ft_init_ext_select(uint flags,

struct st_mrn_ft_info *info = new st_mrn_ft_info();
info->mroonga = this;
info->ctx = grn_ctx_open(0);
grn_ctx_use(info->ctx, grn_ctx_db(ctx));
info->ctx = ctx;
mrn_change_encoding(info->ctx,
table->key_info[key_nr].key_part->field->charset());
info->encoding = GRN_CTX_GET_ENCODING(info->ctx);
Expand Down

0 comments on commit fa0999f

Please sign in to comment.