From e1172aec7d347fcbfe4cabcbb5a60fd2b912756d Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Mon, 12 Mar 2012 11:31:52 +0000 Subject: [PATCH] [PATCH 0/2] A bug in the exclude code --- eb/4395c059ee1c1548f6f2186b190638ccc9c710 | 95 +++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 eb/4395c059ee1c1548f6f2186b190638ccc9c710 diff --git a/eb/4395c059ee1c1548f6f2186b190638ccc9c710 b/eb/4395c059ee1c1548f6f2186b190638ccc9c710 new file mode 100644 index 000000000..e54bed233 --- /dev/null +++ b/eb/4395c059ee1c1548f6f2186b190638ccc9c710 @@ -0,0 +1,95 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 91F87431FBC + for ; Mon, 12 Mar 2012 04:32:00 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id RsF9eFsjADKi for ; + Mon, 12 Mar 2012 04:32:00 -0700 (PDT) +Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com + [209.85.212.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id E88BE431FAF + for ; Mon, 12 Mar 2012 04:31:59 -0700 (PDT) +Received: by wibhq7 with SMTP id hq7so2904632wib.2 + for ; Mon, 12 Mar 2012 04:31:57 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer; + bh=7YwI1ObKT+bhsuMwaWW/z5wczxWJB2fdSIWS755T4Iw=; + b=NnWjT7j04+0BwUSGTCNrNA0Pbf+ukQx10DhVAc11GONSw7p8N4g9kxY3SGVlRu/oCy + +niQjPbcskxU9D682H1Kp2mCSgBdr2rXqsJM5/yV0tFNELC50FEM1hlZ8JfGglG9Sqig + q9l/3Vk94VEZ7H1eZVkP/9fuihPi6EmjeQMAR9IuLy7uYh7fI1epAuuoiVlfNj56ppzM + 919a0zztfQDg8Gy2nM7sYpr3u2w5WkL3B7o13CjMRqWDPRaX2n7z+frSoO7BSnaP36RB + qcvE3TGnDmK0WfmhbrEu/UZrZzBEPARvaeMTuON0GUFta4+dXaLtWs1I7p6R5SGbjCCB + tgwQ== +Received: by 10.180.79.231 with SMTP id m7mr26349093wix.11.1331551917441; + Mon, 12 Mar 2012 04:31:57 -0700 (PDT) +Received: from localhost (94-192-233-223.zone6.bethere.co.uk. + [94.192.233.223]) by mx.google.com with ESMTPS id + t20sm57024857wiv.0.2012.03.12.04.31.55 (version=TLSv1/SSLv3 cipher=OTHER); + Mon, 12 Mar 2012 04:31:56 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 0/2] A bug in the exclude code +Date: Mon, 12 Mar 2012 11:31:52 +0000 +Message-Id: <1331551914-28323-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 12 Mar 2012 11:32:00 -0000 + +There is a bug in the exclude code (found by jrollins in the +--with-excluded series) but also present in master. None of the +current tests were finding it so the first patch adds two tests. + +The bug (and test failure) do not appear in all configuations: on my +main test machine (an oldish debian testing 32bit userspace with a +64bit kernel and xapian 1.2.7) all tests pass. On my laptop (a recent +debian testing 64bit userspace and xapian 1.2.8) one of the new tests +fails. + +The second patch fixes the behaviour for me but I don't see why it +should make a difference: searches for A and not B should give the +same results as A and not (A and B). It could be a bug in xapian, it +could be that I am not allowed to reuse queries as I do (is query1 = +query1 and query2 allowed?) or it could be some memory use bug on my +part. + +Anyway the "fix" is small which should help narrow down the actual +cause. + +Best wishes + +Mark + +Mark Walters (2): + test: add tests for message only search + lib: fix an exclude bug + + lib/query.cc | 5 +++-- + test/search | 11 +++++++++++ + 2 files changed, 14 insertions(+), 2 deletions(-) + +-- +1.7.9.1 + -- 2.26.2