--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id D57A16DE14D1\r
+ for <notmuch@notmuchmail.org>; Mon, 5 Oct 2015 11:27:42 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.156\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.156 tagged_above=-999 required=5\r
+ tests=[AWL=-0.180, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,\r
+ RCVD_IN_MSPIKE_WL=-0.01, URIBL_SBL=0.644, URIBL_SBL_A=0.1]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id vqdVxsjwtw5s for <notmuch@notmuchmail.org>;\r
+ Mon, 5 Oct 2015 11:27:40 -0700 (PDT)\r
+Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com\r
+ [209.85.212.171])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 4CB7B6DE1437\r
+ for <notmuch@notmuchmail.org>; Mon, 5 Oct 2015 11:27:40 -0700 (PDT)\r
+Received: by wicge5 with SMTP id ge5so133309533wic.0\r
+ for <notmuch@notmuchmail.org>; Mon, 05 Oct 2015 11:27:38 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:subject:in-reply-to:references\r
+ :user-agent:date:message-id:mime-version:content-type;\r
+ bh=p/LOocw+a0KUet4fE2tWLSWH32BzcHagm8fLbEOeUBg=;\r
+ b=Ylzn+nW3dwbfA+KqPhP3VrkWx0dYL/ZfS4H8k24Q6+TZU2MaNhikRgSvLkzy4hDRFn\r
+ PRNBVfuC14mwvbTl8PrWRwnXtgfmYvU436IpkpYIknARhODZfhpVMAfsHhIVvlmTFNG+\r
+ NUNigq2HtLvND4TXsmeOM/qZ6c7Qhwmp3TdrDNK0ZeA+5naIjGQ/h80njfKrSZ5vYAHb\r
+ S+erk0eOKOSQsj/oOUCpotfHAhKrSntfyFnBs1hRq1EPzmFpv2sx3HlBQwKqCbbCcTU0\r
+ GMK+ncGUMiqtXlGVHXNBbua8CFWEts5SUZnFFNF3NrZUtrQbg519Da+owN7LY+EctP6a\r
+ rZGg==\r
+X-Gm-Message-State:\r
+ ALoCoQmBB78MWpoZGTWnfl/4PALmz+SW3jIyFls7Q6MTfw7K+j0ic2mllB/ILPppcDg+l2oQT3bb\r
+X-Received: by 10.194.246.161 with SMTP id xx1mr31581992wjc.26.1444069658659; \r
+ Mon, 05 Oct 2015 11:27:38 -0700 (PDT)\r
+Received: from localhost (mobile-access-bcee9f-54.dhcp.inet.fi.\r
+ [188.238.159.54])\r
+ by smtp.gmail.com with ESMTPSA id o10sm15990659wia.4.2015.10.05.11.27.37\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Mon, 05 Oct 2015 11:27:38 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: Re: [Patch v4 7/9] lib: migrate notmuch_database_upgrade to new\r
+ query_search API\r
+In-Reply-To: <1443367923-11867-8-git-send-email-david@tethera.net>\r
+References: <1443367923-11867-1-git-send-email-david@tethera.net>\r
+ <1443367923-11867-8-git-send-email-david@tethera.net>\r
+User-Agent: Notmuch/0.20.2+101~g7b7dadb (http://notmuchmail.org) Emacs/24.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Mon, 05 Oct 2015 21:27:12 +0300\r
+Message-ID: <87bncd8933.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 05 Oct 2015 18:27:42 -0000\r
+\r
+On Sun, 27 Sep 2015, David Bremner <david@tethera.net> wrote:\r
+> Here we depend on the error path cleaning up query\r
+\r
+LGTM\r
+\r
+> ---\r
+> lib/database.cc | 7 ++++---\r
+> 1 file changed, 4 insertions(+), 3 deletions(-)\r
+>\r
+> diff --git a/lib/database.cc b/lib/database.cc\r
+> index f39d448..5e86955 100644\r
+> --- a/lib/database.cc\r
+> +++ b/lib/database.cc\r
+> @@ -1450,9 +1450,10 @@ notmuch_database_upgrade (notmuch_database_t *notmuch,\r
+> \r
+> query = notmuch_query_create (notmuch, "");\r
+> \r
+> - /* XXX: this should use the _st version, but needs an error\r
+> - path */\r
+> - for (messages = notmuch_query_search_messages (query);\r
+> + status = notmuch_query_search_messages_st (query, &messages);\r
+> + if (status)\r
+> + goto DONE;\r
+> + for (;\r
+> notmuch_messages_valid (messages);\r
+> notmuch_messages_move_to_next (messages))\r
+> {\r
+> -- \r
+> 2.5.3\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r