Kouhei Sutou
null+****@clear*****
Sun Aug 16 20:27:26 JST 2015
Kouhei Sutou 2015-08-16 20:27:26 +0900 (Sun, 16 Aug 2015) New Revision: 64b1c75d83af19c9db1f892a02eeb8a764c68de6 https://github.com/groonga/groonga/commit/64b1c75d83af19c9db1f892a02eeb8a764c68de6 Message: Stop to exit() on error Modified files: lib/ii.c Modified: lib/ii.c (+15 -1) =================================================================== --- lib/ii.c 2015-08-16 20:10:07 +0900 (773b06a) +++ lib/ii.c 2015-08-16 20:27:26 +0900 (fc90ce7) @@ -6515,7 +6515,21 @@ grn_ii_select(grn_ctx *ctx, grn_ii *ii, const char *string, unsigned int string_ if (tip == tie) { for (;;) { ti = bt->min; min = ti->pos; max = bt->max->pos; - if (min > max) { exit(0); } + if (min > max) { + char ii_name[GRN_TABLE_MAX_KEY_SIZE]; + int ii_name_size; + ii_name_size = grn_obj_name(ctx, (grn_obj *)ii, ii_name, + GRN_TABLE_MAX_KEY_SIZE); + ERR(GRN_FILE_CORRUPT, + "[ii][select][near] " + "max position must be larger than min position: " + "min:<%d> max:<%d> ii:<%.*s> string:<%.*s>", + min, max, + ii_name_size, ii_name, + string_len, string); + rc = ctx->rc; + goto exit; + } if (max - min <= max_interval) { if (rep) { pi.pos = min; res_add(ctx, s, &pi, weight, op); } noccur++; -------------- next part -------------- HTML����������������������������... 다운로드