From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 948076DE1680 for ; Wed, 15 Mar 2017 18:58:07 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.005 X-Spam-Level: X-Spam-Status: No, score=-0.005 tagged_above=-999 required=5 tests=[AWL=0.006, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y6MThaBlmRjF for ; Wed, 15 Mar 2017 18:58:07 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 0A7016DE14D9 for ; Wed, 15 Mar 2017 18:58:07 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1coKfM-00062g-IS; Wed, 15 Mar 2017 21:57:24 -0400 Received: (nullmailer pid 29495 invoked by uid 1000); Thu, 16 Mar 2017 01:58:05 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [RFC patch 2/2] lib: index message files with duplicate message-ids Date: Wed, 15 Mar 2017 22:57:28 -0300 Message-Id: <20170316015728.29325-3-david@tethera.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170316015728.29325-1-david@tethera.net> References: <20170316015728.29325-1-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Thu, 16 Mar 2017 01:58:07 -0000 The corresponding xapian document just gets more terms added to it, but this doesn't seem to break anything. --- lib/database.cc | 3 +++ test/T670-duplicate-mid.sh | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/database.cc b/lib/database.cc index a679cbab..e83017ed 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -2582,6 +2582,9 @@ notmuch_database_add_message (notmuch_database_t *notmuch, if (ret) goto DONE; } else { + ret = _notmuch_message_index_file (message, message_file); + if (ret) + goto DONE; ret = NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID; } diff --git a/test/T670-duplicate-mid.sh b/test/T670-duplicate-mid.sh index d28afc91..41c53bc8 100755 --- a/test/T670-duplicate-mid.sh +++ b/test/T670-duplicate-mid.sh @@ -6,7 +6,6 @@ add_message [id]=id:duplicate '[subject]="message 1"' add_message [id]=id:duplicate '[subject]="message 2"' test_begin_subtest 'Search for second subject' -test_subtest_known_broken cat <EXPECTED MAIL_DIR/msg-001 MAIL_DIR/msg-002 -- 2.11.0