From: Martin Mares Date: Fri, 31 Aug 2007 13:45:28 +0000 (+0200) Subject: Join in the rare case that presorting creates a single run, which is X-Git-Tag: holmes-import~506^2~13^2~62 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=4a8868b305cbd26fac58e1d08eb98941e5e307cd;p=libucw.git Join in the rare case that presorting creates a single run, which is not known in advance to be final. --- diff --git a/lib/sorter/govern.c b/lib/sorter/govern.c index 7b67110b..f761eb7d 100644 --- a/lib/sorter/govern.c +++ b/lib/sorter/govern.c @@ -158,7 +158,7 @@ sorter_twoway(struct sort_context *ctx, struct sort_bucket *b) do { ++pass; sorter_start_timer(ctx); - if (ins[0]->runs == 1 && ins[1]->runs == 1 && join) + if (ins[0]->runs <= 1 && ins[1]->runs <= 1 && join) { // This is guaranteed to produce a single run, so join if possible outs[0] = join;