[Groonga-commit] groonga/groonga at bfc19df [master] grn_ts: suppress errors in grn_ts_expr_evaluate()

Back to archive index

susumu.yata null+****@clear*****
Sat Sep 5 01:42:28 JST 2015


susumu.yata	2015-09-05 01:42:28 +0900 (Sat, 05 Sep 2015)

  New Revision: bfc19dfd677f173cac4e047c62c92547fc232428
  https://github.com/groonga/groonga/commit/bfc19dfd677f173cac4e047c62c92547fc232428

  Message:
    grn_ts: suppress errors in grn_ts_expr_evaluate()
    
    GitHub: #391

  Modified files:
    lib/ts.c

  Modified: lib/ts.c (+7 -3)
===================================================================
--- lib/ts.c    2015-09-04 23:04:17 +0900 (bb15b8e)
+++ lib/ts.c    2015-09-05 01:42:28 +0900 (3269e05)
@@ -1251,8 +1251,13 @@ grn_ts_expr_column_node_evaluate_scalar(grn_ctx *ctx,
           grn_rc rc = grn_bulk_write(ctx, &node->buf, (char *)&value,\
                                      sizeof(value));\
           if (rc != GRN_SUCCESS) {\
-            GRN_OBJ_FIN(ctx, &src_buf);\
-            return rc;\
+            if (j) {\
+              /* Cancel written values. */\
+              size_t size_written = sizeof(value) * j;\
+              grn_bulk_resize(ctx, &node->buf,\
+                              GRN_BULK_VSIZE(&node->buf) - size_written);\
+            }\
+            out_ptr[i].size = 0;\
           }\
         }\
       } else {\
@@ -1268,7 +1273,6 @@ grn_ts_expr_column_node_evaluate_scalar(grn_ctx *ctx,
     return GRN_SUCCESS;\
   }
 /* grn_ts_expr_column_node_evaluate_vector() outputs vector column values. */
-/* FIXME: Errors are ignored. */
 static grn_rc
 grn_ts_expr_column_node_evaluate_vector(grn_ctx *ctx,
                                         grn_ts_expr_column_node *node,
-------------- next part --------------
HTML����������������������������...
다운로드 



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