[Groonga-commit] groonga/groonga at 1777764 [master] dump: check table key type for token_filters

Back to archive index

naoa null+****@clear*****
Sun Oct 12 02:02:48 JST 2014


naoa	2014-10-12 02:02:48 +0900 (Sun, 12 Oct 2014)

  New Revision: 17777646ddd7b4f99a39c108f9a6db943eac22f4
  https://github.com/groonga/groonga/commit/17777646ddd7b4f99a39c108f9a6db943eac22f4

  Merged aabb56d: Merge pull request #215 from naoa/dump-check-key_type

  Message:
    dump: check table key type for token_filters
    
    In case of TABLE_NO_KEY, grn_obj_get_info outputs an error message

  Added files:
    test/command/suite/dump/schema/table/no_key/no_key.expected
    test/command/suite/dump/schema/table/no_key/no_key.test
  Modified files:
    lib/proc.c

  Modified: lib/proc.c (+1 -1)
===================================================================
--- lib/proc.c    2014-10-11 22:53:32 +0900 (df4927f)
+++ lib/proc.c    2014-10-12 02:02:48 +0900 (70d3f47)
@@ -2750,7 +2750,7 @@ dump_table(grn_ctx *ctx, grn_obj *outbuf, grn_obj *table,
     GRN_TEXT_PUTS(ctx, outbuf, " --normalizer ");
     dump_obj_name(ctx, outbuf, normalizer);
   }
-  {
+  if (table->header.type != GRN_TABLE_NO_KEY) {
     grn_obj token_filters;
     int n_token_filters;
 

  Added: test/command/suite/dump/schema/table/no_key/no_key.expected (+5 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/dump/schema/table/no_key/no_key.expected    2014-10-12 02:02:48 +0900 (dd94f11)
@@ -0,0 +1,5 @@
+table_create Users TABLE_NO_KEY
+[[0,0.0,0.0],true]
+dump
+table_create Users TABLE_NO_KEY
+

  Added: test/command/suite/dump/schema/table/no_key/no_key.test (+3 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/dump/schema/table/no_key/no_key.test    2014-10-12 02:02:48 +0900 (0821304)
@@ -0,0 +1,3 @@
+table_create Users TABLE_NO_KEY
+
+dump
-------------- next part --------------
HTML����������������������������...
下载 



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