[Groonga-commit] groonga/groonga at 9f156ee [master] Split query_log_flags command

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Jun 25 14:34:10 JST 2017


Kouhei Sutou	2017-06-25 14:34:10 +0900 (Sun, 25 Jun 2017)

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

  Message:
    Split query_log_flags command
    
    New commands:
    
      * query_log_flags_get
      * query_log_flags_set
      * query_log_flags_add
      * query_log_flags_remove

  Added files:
    lib/proc/proc_query_log_flags.c
    test/command/suite/query_log_flags_add/invalid_flags.expected
    test/command/suite/query_log_flags_add/invalid_flags.test
    test/command/suite/query_log_flags_add/no_flags.expected
    test/command/suite/query_log_flags_add/no_flags.test
    test/command/suite/query_log_flags_add/valid.test
    test/command/suite/query_log_flags_get/valid.expected
    test/command/suite/query_log_flags_get/valid.test
    test/command/suite/query_log_flags_remove/invalid_flags.expected
    test/command/suite/query_log_flags_remove/invalid_flags.test
    test/command/suite/query_log_flags_remove/no_flags.expected
    test/command/suite/query_log_flags_remove/no_flags.test
    test/command/suite/query_log_flags_remove/valid.test
    test/command/suite/query_log_flags_set/invalid_flags.expected
    test/command/suite/query_log_flags_set/invalid_flags.test
    test/command/suite/query_log_flags_set/no_flags.expected
    test/command/suite/query_log_flags_set/no_flags.test
    test/command/suite/query_log_flags_set/valid.test
  Removed files:
    lib/proc/proc_query_log.c
    test/command/suite/query_log_flags/add.test
    test/command/suite/query_log_flags/invalid/flags.expected
    test/command/suite/query_log_flags/invalid/flags.test
    test/command/suite/query_log_flags/invalid/mode.expected
    test/command/suite/query_log_flags/invalid/mode.test
    test/command/suite/query_log_flags/remove.test
    test/command/suite/query_log_flags/set.test
  Modified files:
    lib/grn_proc.h
    lib/proc.c
    lib/proc/sources.am
  Renamed files:
    test/command/suite/query_log_flags_add/valid.expected
      (from test/command/suite/query_log_flags/add.expected)
    test/command/suite/query_log_flags_remove/valid.expected
      (from test/command/suite/query_log_flags/remove.expected)
    test/command/suite/query_log_flags_set/valid.expected
      (from test/command/suite/query_log_flags/set.expected)

  Modified: lib/grn_proc.h (+4 -1)
===================================================================
--- lib/grn_proc.h    2017-06-25 00:50:27 +0900 (64b7919)
+++ lib/grn_proc.h    2017-06-25 14:34:10 +0900 (7c63f15)
@@ -61,7 +61,10 @@ void grn_proc_init_object_inspect(grn_ctx *ctx);
 void grn_proc_init_object_list(grn_ctx *ctx);
 void grn_proc_init_object_remove(grn_ctx *ctx);
 void grn_proc_init_query_expand(grn_ctx *ctx);
-void grn_proc_init_query_log_flags(grn_ctx *ctx);
+void grn_proc_init_query_log_flags_get(grn_ctx *ctx);
+void grn_proc_init_query_log_flags_set(grn_ctx *ctx);
+void grn_proc_init_query_log_flags_add(grn_ctx *ctx);
+void grn_proc_init_query_log_flags_remove(grn_ctx *ctx);
 void grn_proc_init_schema(grn_ctx *ctx);
 void grn_proc_init_select(grn_ctx *ctx);
 void grn_proc_init_snippet(grn_ctx *ctx);

  Modified: lib/proc.c (+4 -1)
===================================================================
--- lib/proc.c    2017-06-25 00:50:27 +0900 (47a6a95)
+++ lib/proc.c    2017-06-25 14:34:10 +0900 (ecd1216)
@@ -4021,5 +4021,8 @@ grn_db_init_builtin_commands(grn_ctx *ctx)
 
   grn_proc_init_in_records(ctx);
 
-  grn_proc_init_query_log_flags(ctx);
+  grn_proc_init_query_log_flags_get(ctx);
+  grn_proc_init_query_log_flags_set(ctx);
+  grn_proc_init_query_log_flags_add(ctx);
+  grn_proc_init_query_log_flags_remove(ctx);
 }

  Deleted: lib/proc/proc_query_log.c (+0 -112) 100644
===================================================================
--- lib/proc/proc_query_log.c    2017-06-25 00:50:27 +0900 (bf4dac6)
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- c-basic-offset: 2 -*- */
-/*
-  Copyright(C) 2017 Brazil
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License version 2.1 as published by the Free Software Foundation.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#include "../grn_proc.h"
-
-#include <groonga/plugin.h>
-
-static grn_obj *
-command_query_log_flags(grn_ctx *ctx,
-                        int nargs,
-                        grn_obj **args,
-                        grn_user_data *user_data)
-{
-  unsigned int previous_flags;
-  grn_obj *flags_text;
-
-  previous_flags = grn_query_logger_get_flags(ctx);
-  flags_text = grn_plugin_proc_get_var(ctx, user_data, "flags", -1);
-  if (GRN_TEXT_LEN(flags_text) > 0) {
-    unsigned int flags = 0;
-    grn_obj *mode_value;
-
-    if (!grn_query_log_flags_parse(GRN_TEXT_VALUE(flags_text),
-                                   GRN_TEXT_LEN(flags_text),
-                                   &flags)) {
-      GRN_PLUGIN_ERROR(ctx,
-                       GRN_INVALID_ARGUMENT,
-                       "[query-log][flags] invalid query log flags: <%.*s>",
-                       (int)GRN_TEXT_LEN(flags_text),
-                       GRN_TEXT_VALUE(flags_text));
-      grn_ctx_output_null(ctx);
-      return NULL;
-    }
-
-    mode_value = grn_plugin_proc_get_var(ctx, user_data, "mode", -1);
-    if (GRN_TEXT_LEN(mode_value) == 0 ||
-        GRN_TEXT_EQUAL_CSTRING(mode_value, "SET")) {
-      grn_query_logger_set_flags(ctx, flags);
-    } else if (GRN_TEXT_EQUAL_CSTRING(mode_value, "ADD")) {
-      grn_query_logger_add_flags(ctx, flags);
-    } else if (GRN_TEXT_EQUAL_CSTRING(mode_value, "REMOVE")) {
-      grn_query_logger_remove_flags(ctx, flags);
-    } else {
-      GRN_PLUGIN_ERROR(ctx,
-                       GRN_INVALID_ARGUMENT,
-                       "[query-log][flags] "
-                       "mode must be <SET>, <ADD> or <REMOVE>: <%.*s>",
-                       (int)GRN_TEXT_LEN(mode_value),
-                       GRN_TEXT_VALUE(mode_value));
-      grn_ctx_output_null(ctx);
-      return NULL;
-    }
-  }
-
-  {
-    unsigned int current_flags;
-    grn_obj inspected_flags;
-
-    current_flags = grn_query_logger_get_flags(ctx);
-    GRN_TEXT_INIT(&inspected_flags, 0);
-
-    grn_ctx_output_map_open(ctx, "query_log_flags", 2);
-
-    grn_inspect_query_log_flags(ctx, &inspected_flags, previous_flags);
-    grn_ctx_output_cstr(ctx, "previous");
-    grn_ctx_output_str(ctx,
-                       GRN_TEXT_VALUE(&inspected_flags),
-                       GRN_TEXT_LEN(&inspected_flags));
-
-    GRN_BULK_REWIND(&inspected_flags);
-    grn_inspect_query_log_flags(ctx, &inspected_flags, current_flags);
-    grn_ctx_output_cstr(ctx, "current");
-    grn_ctx_output_str(ctx,
-                       GRN_TEXT_VALUE(&inspected_flags),
-                       GRN_TEXT_LEN(&inspected_flags));
-
-    grn_ctx_output_map_close(ctx);
-
-    GRN_OBJ_FIN(ctx, &inspected_flags);
-  }
-
-  return NULL;
-}
-
-void
-grn_proc_init_query_log_flags(grn_ctx *ctx)
-{
-  grn_expr_var vars[2];
-
-  grn_plugin_expr_var_init(ctx, &(vars[0]), "flags", -1);
-  grn_plugin_expr_var_init(ctx, &(vars[1]), "mode", -1);
-  grn_plugin_command_create(ctx,
-                            "query_log_flags", -1,
-                            command_query_log_flags,
-                            2,
-                            vars);
-}

  Added: lib/proc/proc_query_log_flags.c (+220 -0) 100644
===================================================================
--- /dev/null
+++ lib/proc/proc_query_log_flags.c    2017-06-25 14:34:10 +0900 (1c05609)
@@ -0,0 +1,220 @@
+/* -*- c-basic-offset: 2 -*- */
+/*
+  Copyright(C) 2017 Brazil
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License version 2.1 as published by the Free Software Foundation.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+#include "../grn_proc.h"
+
+#include <groonga/plugin.h>
+
+static grn_obj *
+command_query_log_flags_get(grn_ctx *ctx,
+                            int nargs,
+                            grn_obj **args,
+                            grn_user_data *user_data)
+{
+  unsigned int current_flags;
+  grn_obj inspected_flags;
+
+  current_flags = grn_query_logger_get_flags(ctx);
+  GRN_TEXT_INIT(&inspected_flags, 0);
+
+  grn_inspect_query_log_flags(ctx, &inspected_flags,current_flags);
+  grn_ctx_output_str(ctx,
+                     GRN_TEXT_VALUE(&inspected_flags),
+                     GRN_TEXT_LEN(&inspected_flags));
+
+  GRN_OBJ_FIN(ctx, &inspected_flags);
+
+  return NULL;
+}
+
+void
+grn_proc_init_query_log_flags_get(grn_ctx *ctx)
+{
+  grn_plugin_command_create(ctx,
+                            "query_log_flags_get", -1,
+                            command_query_log_flags_get,
+                            0,
+                            NULL);
+}
+
+typedef enum {
+  UPDATE_SET,
+  UPDATE_ADD,
+  UPDATE_REMOVE
+} grn_query_log_flags_update_mode;
+
+static void
+grn_query_log_flags_update(grn_ctx *ctx,
+                           grn_obj *flags_text,
+                           grn_query_log_flags_update_mode mode,
+                           const char *error_message_tag)
+{
+  unsigned int previous_flags;
+  unsigned int flags = 0;
+
+  previous_flags = grn_query_logger_get_flags(ctx);
+  if (GRN_TEXT_LEN(flags_text) == 0) {
+    GRN_PLUGIN_ERROR(ctx,
+                     GRN_INVALID_ARGUMENT,
+                     "%s no query log flags",
+                     error_message_tag);
+    grn_ctx_output_null(ctx);
+    return;
+  }
+
+  if (!grn_query_log_flags_parse(GRN_TEXT_VALUE(flags_text),
+                                 GRN_TEXT_LEN(flags_text),
+                                 &flags)) {
+    GRN_PLUGIN_ERROR(ctx,
+                     GRN_INVALID_ARGUMENT,
+                     "%s invalid query log flags: <%.*s>",
+                     error_message_tag,
+                     (int)GRN_TEXT_LEN(flags_text),
+                     GRN_TEXT_VALUE(flags_text));
+    grn_ctx_output_null(ctx);
+    return;
+  }
+
+  switch (mode) {
+  case UPDATE_SET :
+    grn_query_logger_set_flags(ctx, flags);
+    break;
+  case UPDATE_ADD :
+    grn_query_logger_add_flags(ctx, flags);
+    break;
+  case UPDATE_REMOVE :
+    grn_query_logger_remove_flags(ctx, flags);
+    break;
+  }
+
+  {
+    unsigned int current_flags;
+    grn_obj inspected_flags;
+
+    current_flags = grn_query_logger_get_flags(ctx);
+    GRN_TEXT_INIT(&inspected_flags, 0);
+
+    grn_ctx_output_map_open(ctx, "query_log_flags", 2);
+
+    grn_inspect_query_log_flags(ctx, &inspected_flags, previous_flags);
+    grn_ctx_output_cstr(ctx, "previous");
+    grn_ctx_output_str(ctx,
+                       GRN_TEXT_VALUE(&inspected_flags),
+                       GRN_TEXT_LEN(&inspected_flags));
+
+    GRN_BULK_REWIND(&inspected_flags);
+    grn_inspect_query_log_flags(ctx, &inspected_flags, current_flags);
+    grn_ctx_output_cstr(ctx, "current");
+    grn_ctx_output_str(ctx,
+                       GRN_TEXT_VALUE(&inspected_flags),
+                       GRN_TEXT_LEN(&inspected_flags));
+
+    grn_ctx_output_map_close(ctx);
+
+    GRN_OBJ_FIN(ctx, &inspected_flags);
+  }
+
+  return;
+}
+
+static grn_obj *
+command_query_log_flags_set(grn_ctx *ctx,
+                            int nargs,
+                            grn_obj **args,
+                            grn_user_data *user_data)
+{
+  grn_obj *flags_text;
+
+  flags_text = grn_plugin_proc_get_var(ctx, user_data, "flags", -1);
+  grn_query_log_flags_update(ctx,
+                             flags_text,
+                             UPDATE_SET,
+                             "[query-log][flags][set]");
+  return NULL;
+}
+
+void
+grn_proc_init_query_log_flags_set(grn_ctx *ctx)
+{
+  grn_expr_var vars[1];
+
+  grn_plugin_expr_var_init(ctx, &(vars[0]), "flags", -1);
+  grn_plugin_command_create(ctx,
+                            "query_log_flags_set", -1,
+                            command_query_log_flags_set,
+                            1,
+                            vars);
+}
+
+static grn_obj *
+command_query_log_flags_add(grn_ctx *ctx,
+                            int nargs,
+                            grn_obj **args,
+                            grn_user_data *user_data)
+{
+  grn_obj *flags_text;
+
+  flags_text = grn_plugin_proc_get_var(ctx, user_data, "flags", -1);
+  grn_query_log_flags_update(ctx,
+                             flags_text,
+                             UPDATE_ADD,
+                             "[query-log][flags][add]");
+  return NULL;
+}
+
+void
+grn_proc_init_query_log_flags_add(grn_ctx *ctx)
+{
+  grn_expr_var vars[1];
+
+  grn_plugin_expr_var_init(ctx, &(vars[0]), "flags", -1);
+  grn_plugin_command_create(ctx,
+                            "query_log_flags_add", -1,
+                            command_query_log_flags_add,
+                            1,
+                            vars);
+}
+
+static grn_obj *
+command_query_log_flags_remove(grn_ctx *ctx,
+                               int nargs,
+                               grn_obj **args,
+                               grn_user_data *user_data)
+{
+  grn_obj *flags_text;
+
+  flags_text = grn_plugin_proc_get_var(ctx, user_data, "flags", -1);
+  grn_query_log_flags_update(ctx,
+                             flags_text,
+                             UPDATE_REMOVE,
+                             "[query-log][flags][remove]");
+  return NULL;
+}
+
+void
+grn_proc_init_query_log_flags_remove(grn_ctx *ctx)
+{
+  grn_expr_var vars[1];
+
+  grn_plugin_expr_var_init(ctx, &(vars[0]), "flags", -1);
+  grn_plugin_command_create(ctx,
+                            "query_log_flags_remove", -1,
+                            command_query_log_flags_remove,
+                            1,
+                            vars);
+}

  Modified: lib/proc/sources.am (+1 -1)
===================================================================
--- lib/proc/sources.am    2017-06-25 00:50:27 +0900 (6eddfea)
+++ lib/proc/sources.am    2017-06-25 14:34:10 +0900 (a945320)
@@ -10,7 +10,7 @@ libgrnproc_la_SOURCES =				\
 	proc_object_inspect.c			\
 	proc_object_list.c			\
 	proc_query.c				\
-	proc_query_log.c			\
+	proc_query_log_flags.c			\
 	proc_schema.c				\
 	proc_select.c				\
 	proc_snippet.c				\

  Deleted: test/command/suite/query_log_flags/add.test (+0 -2) 100644
===================================================================
--- test/command/suite/query_log_flags/add.test    2017-06-25 00:50:27 +0900 (d9e43a7)
+++ /dev/null
@@ -1,2 +0,0 @@
-query_log_flags --flags COMMAND|RESULT_CODE --mode SET
-query_log_flags --flags SIZE|SCORE --mode ADD

  Deleted: test/command/suite/query_log_flags/invalid/flags.expected (+0 -13) 100644
===================================================================
--- test/command/suite/query_log_flags/invalid/flags.expected    2017-06-25 00:50:27 +0900 (4cab91c)
+++ /dev/null
@@ -1,13 +0,0 @@
-query_log_flags --flags nonexistent
-[
-  [
-    [
-      -22,
-      0.0,
-      0.0
-    ],
-    "[query-log][flags] invalid query log flags: <nonexistent>"
-  ],
-  null
-]
-#|e| [query-log][flags] invalid query log flags: <nonexistent>

  Deleted: test/command/suite/query_log_flags/invalid/flags.test (+0 -1) 100644
===================================================================
--- test/command/suite/query_log_flags/invalid/flags.test    2017-06-25 00:50:27 +0900 (c6adc1b)
+++ /dev/null
@@ -1 +0,0 @@
-query_log_flags --flags nonexistent

  Deleted: test/command/suite/query_log_flags/invalid/mode.expected (+0 -13) 100644
===================================================================
--- test/command/suite/query_log_flags/invalid/mode.expected    2017-06-25 00:50:27 +0900 (b81cd76)
+++ /dev/null
@@ -1,13 +0,0 @@
-query_log_flags --flags SIZE --mode nonexistent
-[
-  [
-    [
-      -22,
-      0.0,
-      0.0
-    ],
-    "[query-log][flags] mode must be <SET>, <ADD> or <REMOVE>: <nonexistent>"
-  ],
-  null
-]
-#|e| [query-log][flags] mode must be <SET>, <ADD> or <REMOVE>: <nonexistent>

  Deleted: test/command/suite/query_log_flags/invalid/mode.test (+0 -1) 100644
===================================================================
--- test/command/suite/query_log_flags/invalid/mode.test    2017-06-25 00:50:27 +0900 (3ec97bc)
+++ /dev/null
@@ -1 +0,0 @@
-query_log_flags --flags SIZE --mode nonexistent

  Deleted: test/command/suite/query_log_flags/remove.test (+0 -1) 100644
===================================================================
--- test/command/suite/query_log_flags/remove.test    2017-06-25 00:50:27 +0900 (6b97cf5)
+++ /dev/null
@@ -1 +0,0 @@
-query_log_flags --flags DESTINATION|CACHE|SIZE|SCORE --mode REMOVE

  Deleted: test/command/suite/query_log_flags/set.test (+0 -1) 100644
===================================================================
--- test/command/suite/query_log_flags/set.test    2017-06-25 00:50:27 +0900 (bf5f1c2)
+++ /dev/null
@@ -1 +0,0 @@
-query_log_flags --flags SIZE --mode SET

  Added: test/command/suite/query_log_flags_add/invalid_flags.expected (+13 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_add/invalid_flags.expected    2017-06-25 14:34:10 +0900 (c4e4806)
@@ -0,0 +1,13 @@
+query_log_flags_add --flags nonexistent
+[
+  [
+    [
+      -22,
+      0.0,
+      0.0
+    ],
+    "[query-log][flags][add] invalid query log flags: <nonexistent>"
+  ],
+  null
+]
+#|e| [query-log][flags][add] invalid query log flags: <nonexistent>

  Added: test/command/suite/query_log_flags_add/invalid_flags.test (+1 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_add/invalid_flags.test    2017-06-25 14:34:10 +0900 (858e804)
@@ -0,0 +1 @@
+query_log_flags_add --flags nonexistent

  Added: test/command/suite/query_log_flags_add/no_flags.expected (+3 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_add/no_flags.expected    2017-06-25 14:34:10 +0900 (15946d9)
@@ -0,0 +1,3 @@
+query_log_flags_add
+[[[-22,0.0,0.0],"[query-log][flags][add] no query log flags"],null]
+#|e| [query-log][flags][add] no query log flags

  Added: test/command/suite/query_log_flags_add/no_flags.test (+1 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_add/no_flags.test    2017-06-25 14:34:10 +0900 (312b56a)
@@ -0,0 +1 @@
+query_log_flags_add

  Renamed: test/command/suite/query_log_flags_add/valid.expected (+2 -2) 73%
===================================================================
--- test/command/suite/query_log_flags/add.expected    2017-06-25 00:50:27 +0900 (057a040)
+++ test/command/suite/query_log_flags_add/valid.expected    2017-06-25 14:34:10 +0900 (40d66d3)
@@ -1,4 +1,4 @@
-query_log_flags --flags COMMAND|RESULT_CODE --mode SET
+query_log_flags_set --flags COMMAND|RESULT_CODE
 [
   [
     0,
@@ -10,7 +10,7 @@ query_log_flags --flags COMMAND|RESULT_CODE --mode SET
     "current": "COMMAND|RESULT_CODE"
   }
 ]
-query_log_flags --flags SIZE|SCORE --mode ADD
+query_log_flags_add --flags SIZE|SCORE
 [
   [
     0,

  Added: test/command/suite/query_log_flags_add/valid.test (+2 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_add/valid.test    2017-06-25 14:34:10 +0900 (dbb42c8)
@@ -0,0 +1,2 @@
+query_log_flags_set --flags COMMAND|RESULT_CODE
+query_log_flags_add --flags SIZE|SCORE

  Added: test/command/suite/query_log_flags_get/valid.expected (+2 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_get/valid.expected    2017-06-25 14:34:10 +0900 (6122fa7)
@@ -0,0 +1,2 @@
+query_log_flags_get
+[[0,0.0,0.0],"COMMAND|RESULT_CODE|DESTINATION|CACHE|SIZE|SCORE"]

  Added: test/command/suite/query_log_flags_get/valid.test (+1 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_get/valid.test    2017-06-25 14:34:10 +0900 (8183375)
@@ -0,0 +1 @@
+query_log_flags_get

  Added: test/command/suite/query_log_flags_remove/invalid_flags.expected (+13 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_remove/invalid_flags.expected    2017-06-25 14:34:10 +0900 (4a9e04c)
@@ -0,0 +1,13 @@
+query_log_flags_remove --flags nonexistent
+[
+  [
+    [
+      -22,
+      0.0,
+      0.0
+    ],
+    "[query-log][flags][remove] invalid query log flags: <nonexistent>"
+  ],
+  null
+]
+#|e| [query-log][flags][remove] invalid query log flags: <nonexistent>

  Added: test/command/suite/query_log_flags_remove/invalid_flags.test (+1 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_remove/invalid_flags.test    2017-06-25 14:34:10 +0900 (59a8a38)
@@ -0,0 +1 @@
+query_log_flags_remove --flags nonexistent

  Added: test/command/suite/query_log_flags_remove/no_flags.expected (+3 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_remove/no_flags.expected    2017-06-25 14:34:10 +0900 (80c2879)
@@ -0,0 +1,3 @@
+query_log_flags_remove
+[[[-22,0.0,0.0],"[query-log][flags][remove] no query log flags"],null]
+#|e| [query-log][flags][remove] no query log flags

  Added: test/command/suite/query_log_flags_remove/no_flags.test (+1 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_remove/no_flags.test    2017-06-25 14:34:10 +0900 (5f34330)
@@ -0,0 +1 @@
+query_log_flags_remove

  Renamed: test/command/suite/query_log_flags_remove/valid.expected (+1 -1) 69%
===================================================================
--- test/command/suite/query_log_flags/remove.expected    2017-06-25 00:50:27 +0900 (7bc74d9)
+++ test/command/suite/query_log_flags_remove/valid.expected    2017-06-25 14:34:10 +0900 (9f7255e)
@@ -1,4 +1,4 @@
-query_log_flags --flags DESTINATION|CACHE|SIZE|SCORE --mode REMOVE
+query_log_flags_remove --flags DESTINATION|CACHE|SIZE|SCORE
 [
   [
     0,

  Added: test/command/suite/query_log_flags_remove/valid.test (+1 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_remove/valid.test    2017-06-25 14:34:10 +0900 (2dd550f)
@@ -0,0 +1 @@
+query_log_flags_remove --flags DESTINATION|CACHE|SIZE|SCORE

  Added: test/command/suite/query_log_flags_set/invalid_flags.expected (+13 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_set/invalid_flags.expected    2017-06-25 14:34:10 +0900 (44a2f84)
@@ -0,0 +1,13 @@
+query_log_flags_set --flags nonexistent
+[
+  [
+    [
+      -22,
+      0.0,
+      0.0
+    ],
+    "[query-log][flags][set] invalid query log flags: <nonexistent>"
+  ],
+  null
+]
+#|e| [query-log][flags][set] invalid query log flags: <nonexistent>

  Added: test/command/suite/query_log_flags_set/invalid_flags.test (+1 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_set/invalid_flags.test    2017-06-25 14:34:10 +0900 (d0ce212)
@@ -0,0 +1 @@
+query_log_flags_set --flags nonexistent

  Added: test/command/suite/query_log_flags_set/no_flags.expected (+3 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_set/no_flags.expected    2017-06-25 14:34:10 +0900 (54714dd)
@@ -0,0 +1,3 @@
+query_log_flags_set
+[[[-22,0.0,0.0],"[query-log][flags][set] no query log flags"],null]
+#|e| [query-log][flags][set] no query log flags

  Added: test/command/suite/query_log_flags_set/no_flags.test (+1 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_set/no_flags.test    2017-06-25 14:34:10 +0900 (5f185f6)
@@ -0,0 +1 @@
+query_log_flags_set

  Renamed: test/command/suite/query_log_flags_set/valid.expected (+1 -1) 77%
===================================================================
--- test/command/suite/query_log_flags/set.expected    2017-06-25 00:50:27 +0900 (669aec3)
+++ test/command/suite/query_log_flags_set/valid.expected    2017-06-25 14:34:10 +0900 (2d03034)
@@ -1,4 +1,4 @@
-query_log_flags --flags SIZE --mode SET
+query_log_flags_set --flags SIZE
 [
   [
     0,

  Added: test/command/suite/query_log_flags_set/valid.test (+1 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/query_log_flags_set/valid.test    2017-06-25 14:34:10 +0900 (823f909)
@@ -0,0 +1 @@
+query_log_flags_set --flags SIZE
-------------- next part --------------
HTML����������������������������...
Download 



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