[Groonga-commit] groonga/groonga at 9bec7b7 [master] object_remove: force remove .c file

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Feb 21 22:35:43 JST 2016


Kouhei Sutou	2016-02-21 22:35:43 +0900 (Sun, 21 Feb 2016)

  New Revision: 9bec7b7eb57deb4c1e29ea8c7e889551edcab33e
  https://github.com/groonga/groonga/commit/9bec7b7eb57deb4c1e29ea8c7e889551edcab33e

  Message:
    object_remove: force remove .c file

  Added files:
    test/command/suite/object_remove/broken/index_column_force.expected
    test/command/suite/object_remove/broken/index_column_force.test
  Modified files:
    lib/proc/proc_object.c

  Modified: lib/proc/proc_object.c (+2 -0)
===================================================================
--- lib/proc/proc_object.c    2016-02-21 18:52:06 +0900 (d3f8be5)
+++ lib/proc/proc_object.c    2016-02-21 22:35:43 +0900 (541c7b3)
@@ -104,6 +104,8 @@ command_object_remove(grn_ctx *ctx,
       grn_obj_delete_by_id(ctx, db, id, GRN_TRUE);
       grn_obj_path_by_id(ctx, db, id, path);
       grn_io_remove(ctx, path);
+      grn_strcat(path, PATH_MAX, ".c");
+      grn_io_remove(ctx, path);
       grn_ctx_output_bool(ctx, ctx->rc == GRN_SUCCESS);
       return NULL;
     }

  Added: test/command/suite/object_remove/broken/index_column_force.expected (+23 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/object_remove/broken/index_column_force.expected    2016-02-21 22:35:43 +0900 (5544e9f)
@@ -0,0 +1,23 @@
+table_create Users TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+table_create Terms TABLE_PAT_KEY ShortText   --default_tokenizer TokenBigram   --normalizer NormalizerAuto
+[[0,0.0,0.0],true]
+column_create Terms index COLUMN_INDEX|WITH_POSITION Users _key
+[[0,0.0,0.0],true]
+database_unmap
+[[0,0.0,0.0],true]
+object_remove Terms.index --force yes
+[
+  [
+    [
+      -65,
+      0.0,
+      0.0
+    ],
+    "[io][open] file size is too small: <8>(required: >= 64): <db/db.0000102>"
+  ],
+  false
+]
+#|e| [io][open] file size is too small: <8>(required: >= 64): <db/db.0000102>
+column_create Terms index COLUMN_INDEX|WITH_POSITION Users _key
+[[0,0.0,0.0],true]

  Added: test/command/suite/object_remove/broken/index_column_force.test (+14 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/object_remove/broken/index_column_force.test    2016-02-21 22:35:43 +0900 (4509992)
@@ -0,0 +1,14 @@
+table_create Users TABLE_HASH_KEY ShortText
+table_create Terms TABLE_PAT_KEY ShortText \
+  --default_tokenizer TokenBigram \
+  --normalizer NormalizerAuto
+column_create Terms index COLUMN_INDEX|WITH_POSITION Users _key
+
+#@disable-logging
+thread_limit 1
+#@enable-logging
+database_unmap
+#@copy-path fixture/object_remove/too_small #{db_path}.0000102
+
+object_remove Terms.index --force yes
+column_create Terms index COLUMN_INDEX|WITH_POSITION Users _key
-------------- next part --------------
HTML����������������������������...
Download 



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