[Groonga-commit] groonga/groonga [master] Fix a crash bug by "--output_columns _score.GARBAGE"

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Mar 14 23:02:17 JST 2013


Kouhei Sutou	2013-03-14 23:02:17 +0900 (Thu, 14 Mar 2013)

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

  Message:
    Fix a crash bug by "--output_columns _score.GARBAGE"

  Added files:
    test/command/suite/select/output_columns/score/chained.expected
    test/command/suite/select/output_columns/score/chained.test
  Modified files:
    lib/db.c

  Modified: lib/db.c (+4 -0)
===================================================================
--- lib/db.c    2013-03-14 22:19:58 +0900 (0fb5d5b)
+++ lib/db.c    2013-03-14 23:02:17 +0900 (bbbdf81)
@@ -3858,6 +3858,10 @@ grn_obj_get_accessor(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned int
       break;
     }
   }
+  if (!obj) {
+    res = NULL;
+    goto exit;
+  }
   {
     size_t len;
     const char *sp, *se = name + name_size;

  Added: test/command/suite/select/output_columns/score/chained.expected (+10 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/output_columns/score/chained.expected    2013-03-14 23:02:17 +0900 (382a907)
@@ -0,0 +1,10 @@
+table_create Sites TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+load --table Sites
+[
+["_key"],
+["http://groonga.org/"]
+]
+[[0,0.0,0.0],1]
+select Sites --filter true --output_columns '_score.garbage'
+[[0,0.0,0.0],[[[1],[["_score","Int32"]],[1]]]]

  Added: test/command/suite/select/output_columns/score/chained.test (+9 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/output_columns/score/chained.test    2013-03-14 23:02:17 +0900 (4d858bd)
@@ -0,0 +1,9 @@
+table_create Sites TABLE_HASH_KEY ShortText
+
+load --table Sites
+[
+["_key"],
+["http://groonga.org/"]
+]
+
+select Sites --filter true --output_columns '_score.garbage'
-------------- next part --------------
HTML����������������������������...
Download 



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