[Groonga-commit] groonga/groonga at 5b50ece [master] reindex: don't truncate tables

Zurück zum Archiv-Index

Susumu Yata null+****@clear*****
Tue Apr 11 18:22:50 JST 2017


Susumu Yata	2017-04-11 18:22:50 +0900 (Tue, 11 Apr 2017)

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

  Message:
    reindex: don't truncate tables
    
    GitHub: fix #646

  Modified files:
    lib/obj.c

  Modified: lib/obj.c (+0 -11)
===================================================================
--- lib/obj.c    2017-04-11 18:17:39 +0900 (51404e3)
+++ lib/obj.c    2017-04-11 18:22:50 +0900 (e6e349d)
@@ -443,20 +443,9 @@ grn_table_reindex(grn_ctx *ctx, grn_obj *table)
   }
 
   if (grn_table_columns(ctx, table, "", 0, (grn_obj *)columns) > 0) {
-    grn_bool have_data_column = GRN_FALSE;
     grn_id *key;
     GRN_HASH_EACH(ctx, columns, id, &key, NULL, NULL, {
       grn_obj *column = grn_ctx_at(ctx, *key);
-      if (column && column->header.type != GRN_COLUMN_INDEX) {
-        have_data_column = GRN_TRUE;
-        break;
-      }
-    });
-    if (!have_data_column) {
-      grn_table_truncate(ctx, table);
-    }
-    GRN_HASH_EACH(ctx, columns, id, &key, NULL, NULL, {
-      grn_obj *column = grn_ctx_at(ctx, *key);
       if (column && column->header.type == GRN_COLUMN_INDEX) {
         grn_obj_reindex(ctx, column);
       }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index