[Groonga-mysql-commit] mroonga/mroonga at fa0999f [master] Stop to create grn_ctx for each MATCH AGAINST

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Oct 8 12:57:54 JST 2013


Kouhei Sutou	2013-10-08 12:57:54 +0900 (Tue, 08 Oct 2013)

  New Revision: fa0999ff79c9cb080d20ca21fd45697d52a340b4
  https://github.com/mroonga/mroonga/commit/fa0999ff79c9cb080d20ca21fd45697d52a340b4

  Message:
    Stop to create grn_ctx for each MATCH AGAINST
    
    Because one handler isn't used from multi threads. So we can use the
    same grn_ctx for multi MATCH AGAINSTs.

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+1 -3)
===================================================================
--- ha_mroonga.cpp    2013-10-08 11:04:48 +0900 (78495cc)
+++ ha_mroonga.cpp    2013-10-08 12:57:54 +0900 (7e02c7b)
@@ -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;
 }
@@ -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);
-------------- next part --------------
HTML����������������������������...
Télécharger 



More information about the Groonga-mysql-commit mailing list
Back to archive index