[Groonga-commit] groonga/groonga at e1cfc0e [master] select: support no sort key case

Back to archive index

Kouhei Sutou null+****@clear*****
Sun May 22 18:01:18 JST 2016


Kouhei Sutou	2016-05-22 18:01:18 +0900 (Sun, 22 May 2016)

  New Revision: e1cfc0e2e4157347c3779bc81b3f2a56d2f1d00c
  https://github.com/groonga/groonga/commit/e1cfc0e2e4157347c3779bc81b3f2a56d2f1d00c

  Message:
    select: support no sort key case

  Modified files:
    lib/proc/proc_select.c

  Modified: lib/proc/proc_select.c (+12 -8)
===================================================================
--- lib/proc/proc_select.c    2016-05-22 17:56:19 +0900 (5850c43)
+++ lib/proc/proc_select.c    2016-05-22 18:01:18 +0900 (4fb162a)
@@ -1393,14 +1393,18 @@ grn_select_sort(grn_ctx *ctx,
                                      data->tables.result,
                                      &n_keys);
   if (!keys) {
-    GRN_PLUGIN_ERROR(ctx,
-                     ctx->rc,
-                     "[select][sort] "
-                     "failed to parse: <%.*s>: %s",
-                     (int)(data->sort_keys.length),
-                     data->sort_keys.value,
-                     ctx->errbuf);
-    return GRN_FALSE;
+    if (ctx->rc == GRN_SUCCESS) {
+      return GRN_TRUE;
+    } else {
+      GRN_PLUGIN_ERROR(ctx,
+                       ctx->rc,
+                       "[select][sort] "
+                       "failed to parse: <%.*s>: %s",
+                       (int)(data->sort_keys.length),
+                       data->sort_keys.value,
+                       ctx->errbuf);
+      return GRN_FALSE;
+    }
   }
 
   data->tables.sorted = grn_table_create(ctx, NULL, 0, NULL,
-------------- next part --------------
HTML����������������������������...
下载 



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