null+****@clear*****
null+****@clear*****
2010年 7月 1日 (木) 11:15:43 JST
Kouhei Sutou 2010-07-01 02:15:43 +0000 (Thu, 01 Jul 2010) New Revision: 9b95af7fbf1eb5869213581b053fa8d0ed8c47f0 Log: add broken reference value check into grn_table_group(). Modified files: lib/db.c Modified: lib/db.c (+4 -0) =================================================================== --- lib/db.c 2010-07-01 01:33:41 +0000 (d15ba14) +++ lib/db.c 2010-07-01 02:15:43 +0000 (b54f4b3) @@ -2218,6 +2218,10 @@ accelerated_table_group(grn_ctx *ctx, grn_obj *table, grn_obj *key, grn_obj *res } id_ = (grn_id *)_grn_table_key(ctx, table, id, &key_size); v = grn_ra_ref_cache(ctx, ra, *id_, &cache); + if (idp && *((grn_id *)v) && + grn_table_at(ctx, range, *((grn_id *)v)) == GRN_ID_NIL) { + continue; + } if ((!idp || *((grn_id *)v)) && grn_table_add_v(ctx, res, v, element_size, &value, NULL)) { grn_table_add_subrec(res, value, ri ? ri->score : 0, NULL, 0);