susumu.yata
null+****@clear*****
Mon Sep 7 10:59:15 JST 2015
susumu.yata 2015-09-07 10:59:15 +0900 (Mon, 07 Sep 2015) New Revision: bc45c0f27c6a0df4ce9179b8b650b087331640ae https://github.com/groonga/groonga/commit/bc45c0f27c6a0df4ce9179b8b650b087331640ae Message: grn_ts: ignore destruction failures in grn_ts_select() GitHub: #389 Modified files: lib/ts.c Modified: lib/ts.c (+5 -10) =================================================================== --- lib/ts.c 2015-09-05 01:51:33 +0900 (8f76120) +++ lib/ts.c 2015-09-07 10:59:15 +0900 (9305713) @@ -2627,7 +2627,7 @@ grn_ts_select_filter(grn_ctx *ctx, grn_obj *table, const char *str, size_t str_size, size_t offset, size_t limit, grn_ts_record **out, size_t *n_out, size_t *n_hits) { - grn_rc rc, tmp_rc; + grn_rc rc; grn_table_cursor *cursor; grn_ts_expr *expr; grn_ts_record *buf = NULL; @@ -2704,16 +2704,11 @@ grn_ts_select_filter(grn_ctx *ctx, grn_obj *table, } *n_out += batch_size; } - tmp_rc = grn_ts_expr_close(ctx, expr); - if (rc == GRN_SUCCESS) { - rc = tmp_rc; - } - } - - tmp_rc = grn_table_cursor_close(ctx, cursor); - if (rc == GRN_SUCCESS) { - rc = tmp_rc; + /* Ignore a failure of destruction. */ + grn_ts_expr_close(ctx, expr); } + /* Ignore a failure of destruction. */ + grn_table_cursor_close(ctx, cursor); if (rc != GRN_SUCCESS) { if (buf) { -------------- next part -------------- HTML����������������������������...Download