[Groonga-commit] groonga/groonga at 788312a [master] Fix a crash bug

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Jul 30 23:12:39 JST 2013


Kouhei Sutou	2013-07-30 23:12:39 +0900 (Tue, 30 Jul 2013)

  New Revision: 788312a0a8d6dd013933c84524c937fb0ed69bd6
  https://github.com/groonga/groonga/commit/788312a0a8d6dd013933c84524c937fb0ed69bd6

  Message:
    Fix a crash bug
    
    It causes by offline index construction for vector column that has
    orphan reference. Groonga should avoid the case (e.g. groonga returns
    an error for removing table that is referred from any column) but
    this fix will be useful a bit to make groonga more robust.

  Modified files:
    lib/db.c

  Modified: lib/db.c (+1 -1)
===================================================================
--- lib/db.c    2013-07-30 12:27:58 +0900 (b67a474)
+++ lib/db.c    2013-07-30 23:12:39 +0900 (e7ed8fb)
@@ -5690,7 +5690,7 @@ grn_obj_get_value(grn_ctx *ctx, grn_obj *obj, grn_id id, grn_obj *value)
     case GRN_OBJ_COLUMN_VECTOR :
       {
         grn_obj *lexicon = grn_ctx_at(ctx, DB_OBJ(obj)->range);
-        if (!GRN_OBJ_TABLEP(lexicon) &&
+        if (lexicon && !GRN_OBJ_TABLEP(lexicon) &&
             (lexicon->header.flags & GRN_OBJ_KEY_VAR_SIZE)) {
           grn_obj v_;
           grn_obj_ensure_vector(ctx, value);
-------------- next part --------------
HTML����������������������������...
다운로드 



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