Kouhei Sutou
null+****@clear*****
Fri Dec 14 18:37:38 JST 2012
Kouhei Sutou 2012-12-14 18:37:38 +0900 (Fri, 14 Dec 2012) New Revision: 43b9de34d911de22c4c8be990268a8e2eb3853d5 https://github.com/mroonga/mroonga/commit/43b9de34d911de22c4c8be990268a8e2eb3853d5 Log: Fix a bug that ctx for snippet isn't associated with DB Anonymous DB is assigned. Modified files: ha_mroonga.cpp Modified: ha_mroonga.cpp (+3 -0) =================================================================== --- ha_mroonga.cpp 2012-12-14 18:26:42 +0900 (e1f23cc) +++ ha_mroonga.cpp 2012-12-14 18:37:38 +0900 (29151e1) @@ -1043,6 +1043,7 @@ MRN_API my_bool mroonga_snippet_init(UDF_INIT *initid, UDF_ARGS *args, char *mes goto error; } grn_ctx_init(&snip_info->ctx, 0); + grn_db_create(&snip_info->ctx, NULL, 0); for (i = 1; i < args->arg_count; i++) { if (!args->args[i]) { @@ -1061,6 +1062,7 @@ MRN_API my_bool mroonga_snippet_init(UDF_INIT *initid, UDF_ARGS *args, char *mes error: if (snip_info) { + grn_obj_close(&snip_info->ctx, grn_ctx_db(&snip_info->ctx)); grn_ctx_fin(&snip_info->ctx); my_free(snip_info, MYF(0)); } @@ -1157,6 +1159,7 @@ MRN_API void mroonga_snippet_deinit(UDF_INIT *initid) grn_snip_close(&snip_info->ctx, snip_info->snippet); } snip_info->result_str.free(); + grn_obj_close(&snip_info->ctx, grn_ctx_db(&snip_info->ctx)); grn_ctx_fin(&snip_info->ctx); my_free(snip_info, MYF(0)); } -------------- next part -------------- HTML����������������������������... 下載