Kouhei Sutou
null+****@clear*****
Mon Jan 26 23:52:42 JST 2015
Kouhei Sutou 2015-01-26 23:52:42 +0900 (Mon, 26 Jan 2015) New Revision: 200a753faec71c03b610691fdee3cdeeb616d284 https://github.com/groonga/groonga/commit/200a753faec71c03b610691fdee3cdeeb616d284 Message: Don't touch on error Modified files: lib/db.c Modified: lib/db.c (+9 -3) =================================================================== --- lib/db.c 2015-01-26 23:50:35 +0900 (8853ddc) +++ lib/db.c 2015-01-26 23:52:42 +0900 (ee120aa) @@ -1783,7 +1783,9 @@ grn_table_delete(grn_ctx *ctx, grn_obj *table, const void *key, unsigned int key }); break; } - grn_obj_touch(ctx, table, NULL); + if (rc == GRN_SUCCESS) { + grn_obj_touch(ctx, table, NULL); + } } } exit : @@ -1842,7 +1844,9 @@ grn_table_delete_by_id(grn_ctx *ctx, grn_obj *table, grn_id id) } else { rc = _grn_table_delete_by_id(ctx, table, id, NULL); } - grn_obj_touch(ctx, table, NULL); + if (rc == GRN_SUCCESS) { + grn_obj_touch(ctx, table, NULL); + } GRN_API_RETURN(rc); } @@ -1946,7 +1950,9 @@ grn_table_truncate(grn_ctx *ctx, grn_obj *table) grn_obj_set_info(ctx, table, GRN_INFO_NORMALIZER, normalizer); grn_obj_set_info(ctx, table, GRN_INFO_TOKEN_FILTERS, &token_filters); GRN_OBJ_FIN(ctx, &token_filters); - grn_obj_touch(ctx, table, NULL); + if (rc == GRN_SUCCESS) { + grn_obj_touch(ctx, table, NULL); + } } exit : GRN_API_RETURN(rc); -------------- next part -------------- HTML����������������������������...Download