Kouhei Sutou
null+****@clear*****
Sat May 21 16:35:00 JST 2016
Kouhei Sutou 2016-05-21 16:35:00 +0900 (Sat, 21 May 2016) New Revision: ed0671f2f4d9d50a7c7cce32bf5ef1e8a8c0b405 https://github.com/groonga/groonga/commit/ed0671f2f4d9d50a7c7cce32bf5ef1e8a8c0b405 Message: select: extract preparing slices code Modified files: lib/proc/proc_select.c Modified: lib/proc/proc_select.c (+14 -2) =================================================================== --- lib/proc/proc_select.c 2016-05-21 16:26:44 +0900 (bc5f663) +++ lib/proc/proc_select.c 2016-05-21 16:35:00 +0900 (854e921) @@ -1247,6 +1247,17 @@ grn_select_apply_filtered_columns(grn_ctx *ctx, } static grn_bool +grn_select_prepare_slices(grn_ctx *ctx, + grn_select_data *data) +{ + if (data->slices) { + data->output.n_elements += 1; + } + + return GRN_TRUE; +} + +static grn_bool grn_select_slice_execute(grn_ctx *ctx, grn_select_data *data, grn_obj *table, @@ -2175,10 +2186,11 @@ grn_select(grn_ctx *ctx, grn_select_data *data) } { + /* For select results */ data->output.n_elements = 1; - if (data->slices) { - data->output.n_elements += 1; + if (!grn_select_prepare_slices(ctx, data)) { + goto exit; } if (data->drilldowns) { -------------- next part -------------- HTML����������������������������... 下載