[Groonga-commit] groonga/groonga at 71695c8 [master] Support temporary lexicon and index column

Back to archive index

Kouhei Sutou null+****@clear*****
Tue May 1 17:37:46 JST 2018


Kouhei Sutou	2018-05-01 17:37:46 +0900 (Tue, 01 May 2018)

  New Revision: 71695c8a1d48ac1246a96b25fa1316b4b88ba921
  https://github.com/groonga/groonga/commit/71695c8a1d48ac1246a96b25fa1316b4b88ba921

  Message:
    Support temporary lexicon and index column
    
    We shouldn't unlink temporary objects because grn_obj_unlink() for
    a temporary object really runs grn_obj_close().

  Modified files:
    lib/db.c

  Modified: lib/db.c (+0 -13)
===================================================================
--- lib/db.c    2018-04-29 14:47:51 +0900 (d2d4fb205)
+++ lib/db.c    2018-05-01 17:37:46 +0900 (df7371f7b)
@@ -3710,7 +3710,6 @@ grn_obj_search_column_index_by_key(grn_ctx *ctx, grn_obj *obj,
   if (table) {
     key_type = table->header.domain;
     need_cast = (query->header.domain != key_type);
-    grn_obj_unlink(ctx, table);
   }
   if (need_cast) {
     GRN_OBJ_INIT(&casted_query, GRN_BULK, 0, key_type);
@@ -4553,9 +4552,6 @@ grn_table_group(grn_ctx *ctx, grn_obj *table,
                                                         key_type, table,
                                                         rp->max_n_subrecs,
                                                         additional_value_size);
-        if (key_type) {
-          grn_obj_unlink(ctx, key_type);
-        }
         if (!rp->table) {
           goto exit;
         }
@@ -7701,7 +7697,6 @@ grn_obj_set_value_column_var_size_vector(grn_ctx *ctx, grn_obj *obj, grn_id id,
                 grn_obj *range_obj;
                 range_obj = grn_ctx_at(ctx, range);
                 ERR_CAST(obj, range_obj, &value_buf);
-                grn_obj_unlink(ctx, range_obj);
               } else {
                 element = GRN_BULK_HEAD(&cast_buf);
                 element_length = GRN_BULK_VSIZE(&cast_buf);
@@ -7770,7 +7765,6 @@ grn_obj_set_value_column_fix_size(grn_ctx *ctx, grn_obj *obj, grn_id id,
       grn_obj *range_obj;
       range_obj = grn_ctx_at(ctx, range);
       ERR_CAST(obj, range_obj, value);
-      grn_obj_unlink(ctx, range_obj);
     } else {
       value_ = &buf;
       v = GRN_BULK_HEAD(&buf);
@@ -8880,19 +8874,12 @@ grn_obj_set_info_source_validate(grn_ctx *ctx, grn_obj *obj, grn_obj *value)
         }
       }
     }
-    grn_obj_unlink(ctx, source);
     if (ctx->rc != GRN_SUCCESS) {
       goto exit;
     }
   }
 
 exit:
-  if (lexicon) {
-    grn_obj_unlink(ctx, lexicon);
-  }
-  if (lexicon_domain) {
-    grn_obj_unlink(ctx, lexicon_domain);
-  }
   return ctx->rc;
 }
 
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180501/2888a19c/attachment-0001.htm 



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