[Groonga-commit] groonga/groonga at 5f623bc [master] mrb: unlink temporary table on error

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Aug 17 15:12:39 JST 2015


Kouhei Sutou	2015-08-17 15:12:39 +0900 (Mon, 17 Aug 2015)

  New Revision: 5f623bcb4f2aa8af3ce860fa5b34fa523bb5e9af
  https://github.com/groonga/groonga/commit/5f623bcb4f2aa8af3ce860fa5b34fa523bb5e9af

  Message:
    mrb: unlink temporary table on error

  Modified files:
    lib/mrb/mrb_table.c

  Modified: lib/mrb/mrb_table.c (+6 -1)
===================================================================
--- lib/mrb/mrb_table.c    2015-08-17 12:47:23 +0900 (59ce303)
+++ lib/mrb/mrb_table.c    2015-08-17 15:12:39 +0900 (a44537c)
@@ -152,7 +152,12 @@ mrb_grn_table_select(mrb_state *mrb, mrb_value self)
   }
 
   result = grn_table_select(ctx, table, expr, result, operator);
-  grn_mrb_ctx_check(mrb);
+  if (ctx->rc != GRN_SUCCESS) {
+    if (result) {
+      grn_obj_unlink(ctx, result);
+    }
+    grn_mrb_ctx_check(mrb);
+  }
 
   return grn_mrb_value_from_grn_obj(mrb, result);
 }
-------------- next part --------------
HTML����������������������������...
Télécharger 



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