[Groonga-commit] groonga/groonga at a3b8fcb [master] grn_obj_remove: fix a bug that too much close

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Sep 11 10:51:25 JST 2015


Kouhei Sutou	2015-09-11 10:51:25 +0900 (Fri, 11 Sep 2015)

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

  Message:
    grn_obj_remove: fix a bug that too much close
    
    Type, Proc and so on should not be closed.

  Modified files:
    lib/db.c

  Modified: lib/db.c (+2 -4)
===================================================================
--- lib/db.c    2015-09-10 22:43:54 +0900 (e52282a)
+++ lib/db.c    2015-09-11 10:51:25 +0900 (73b6b63)
@@ -8447,10 +8447,6 @@ is_removable_table(grn_ctx *ctx, grn_obj *table, grn_obj *db)
 
       if (is_close_opened_object_mode) {
         is_opened = grn_ctx_is_opened(ctx, id);
-        if (!is_opened) {
-          grn_bulk_write(ctx, &not_opened_ids,
-                         (const char *)&id, sizeof(grn_id));
-        }
       }
 
       object = grn_ctx_at(ctx, id);
@@ -8509,6 +8505,8 @@ is_removable_table(grn_ctx *ctx, grn_obj *table, grn_obj *db)
       }
 
       if (is_close_opened_object_mode && !is_opened) {
+        grn_bulk_write(ctx, &not_opened_ids,
+                       (const char *)&id, sizeof(grn_id));
         grn_obj_close(ctx, object);
       } else {
         grn_obj_unlink(ctx, object);
-------------- next part --------------
HTML����������������������������...
Download 



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