From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DED70431FCF for ; Wed, 14 Mar 2012 05:26:57 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 2.7 X-Spam-Level: ** X-Spam-Status: No, score=2.7 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, FREEMAIL_REPLY=2.499, 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 oEK8Nog5vzNj for ; Wed, 14 Mar 2012 05:26:57 -0700 (PDT) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 0E44E431FAE for ; Wed, 14 Mar 2012 05:26:56 -0700 (PDT) Received: by wibhm17 with SMTP id hm17so6170418wib.2 for ; Wed, 14 Mar 2012 05:26:55 -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=Z1uEaZctIzEOCwdRVA7bOwWXPlMSS5fiG2rp/6eCl2Q=; b=yTKFmZWWgEwqRe7AtF1uu4Hch6rdWu8Cf8/vd3FsVySXzHta/mf0MeY7Ue3TkW4knB gyFKcVsSwshDVfugyxcboS4chm8n9hYIw8my+iub8OOdLTkdjbr0myZSbU6f16Ui6FBC s5h1qMMaB0pv7p0Gs7d2AeTfRq+EwOO6s86HZ+e2Z6NJuwFcrS3IsTxw3qRGAK3my9TN vG1z9rz5s1Cvc9YMToLwhjhgjh7DSH2bUDSxoPs4jIm84z0HqEAWhtfVZLIS8IGILIRK GIrjg+YvD3LwtyE8Szc7bZdlhUO81oAHcMn0Z6KiAo04OzzfAVidxp/nNXtOyB/FbnR9 aJtg== Received: by 10.180.24.66 with SMTP id s2mr5956550wif.7.1331728015580; Wed, 14 Mar 2012 05:26:55 -0700 (PDT) Received: from localhost (94-192-233-223.zone6.bethere.co.uk. [94.192.233.223]) by mx.google.com with ESMTPS id d7sm15991026wiz.6.2012.03.14.05.26.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Mar 2012 05:26:54 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [Patch v2 0/3] Add test and fix exclude bug Date: Wed, 14 Mar 2012 12:26:51 +0000 Message-Id: <1331728014-32698-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: Wed, 14 Mar 2012 12:26:58 -0000 The test in the previous patches id:"1331551914-28323-1-git-send-email-markwalters1009@gmail.com" triggered the bug accidentally. It accidentally set the exclude tags to be "=" and "deleted" rather than just "deleted". The non-existent "=" tag (i.e., the tag that does not occur anywhere in the Xapian database) triggered the bug. First we correct the tests to just set the "deleted" tag, then we add some tests including one with a deliberately non-existent tag. Finally, we modify the exclusion code to avoid the bug. The modification also appears to fix a similar problem for jrollins that I have not yet been able to reproduce. Since the code is now more clearly correct, cleaner and we do definitely avoid a Xapian bug I think these patches can be committed even without knowing why it fixed jrollins' bug. Finally these apply to current master (not to the --with-excluded series). Best wishes Mark Mark Walters (3): test: the test for the exclude code mistakenly excludes the tag "=" test: add tests for message only search lib: fix an exclude bug lib/query.cc | 5 +++-- test/count | 2 +- test/search | 19 ++++++++++++++++++- 3 files changed, 22 insertions(+), 4 deletions(-) -- 1.7.9.1