[PATCH 1/3] query: bind queries to database objects
authorFelipe Contreras <felipe.contreras@gmail.com>
Mon, 30 Sep 2013 16:28:41 +0000 (11:28 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:12 +0000 (09:57 -0800)
24/eb3857af858ccea18dd622e39e8dac9c9bb1aa [new file with mode: 0644]

diff --git a/24/eb3857af858ccea18dd622e39e8dac9c9bb1aa b/24/eb3857af858ccea18dd622e39e8dac9c9bb1aa
new file mode 100644 (file)
index 0000000..f9d8c05
--- /dev/null
@@ -0,0 +1,86 @@
+Return-Path: <felipe.contreras@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1AA48431FD2\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Sep 2013 09:34:40 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id DYhJbRycu0zX for <notmuch@notmuchmail.org>;\r
+       Mon, 30 Sep 2013 09:34:31 -0700 (PDT)\r
+Received: from mail-oa0-f53.google.com (mail-oa0-f53.google.com\r
+       [209.85.219.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id D6AEF431FC3\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Sep 2013 09:34:31 -0700 (PDT)\r
+Received: by mail-oa0-f53.google.com with SMTP id i7so3914738oag.12\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Sep 2013 09:34:31 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+       bh=yW+raQgoZF48FtmFumIJgRnlD9NH5puf6iM9+tUDtF4=;\r
+       b=LEoI0LvJ9QZCCA3ZMK1dRf14tYTcQLhDBxlVZIjNg0unj7tJqyBhVTXB57L+aSOJTJ\r
+       VZRl4C/raEgS6W4pFVT4b2Y4zAUH8liHGTZZrF8AkoTn+csCrQA37iKJhhA6DN2z8sI2\r
+       kUTPeQl/Gt2EbQXHRi16eS3MTngT38cUrpWvZBsmBJl2O6A/sQgDeYmY+JTcQrSyzHUA\r
+       EYChYz/BMZ/UsnUahrbIP9GAj46lWbE2bI3xRfY/S5MJWmXp5fg3Ompj/wVhUfRm+Y6c\r
+       eg/voDh4fU2AtGwoa6pu54FbPCbZ0YCMblH4L58qFkwicnwbq3M1iNNxxK1MxyxWeVY8\r
+       yqSA==\r
+X-Received: by 10.60.160.197 with SMTP id xm5mr1403948oeb.53.1380558871445;\r
+       Mon, 30 Sep 2013 09:34:31 -0700 (PDT)\r
+Received: from localhost (187-162-140-241.static.axtel.net. [187.162.140.241])\r
+       by mx.google.com with ESMTPSA id\r
+       rl1sm1967045oeb.7.1969.12.31.16.00.00\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128);\r
+       Mon, 30 Sep 2013 09:34:30 -0700 (PDT)\r
+From: Felipe Contreras <felipe.contreras@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/3] query: bind queries to database objects\r
+Date: Mon, 30 Sep 2013 11:28:41 -0500\r
+Message-Id: <1380558523-6913-2-git-send-email-felipe.contreras@gmail.com>\r
+X-Mailer: git-send-email 1.8.4-fc\r
+In-Reply-To: <1380558523-6913-1-git-send-email-felipe.contreras@gmail.com>\r
+References: <1380558523-6913-1-git-send-email-felipe.contreras@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\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, 30 Sep 2013 16:34:40 -0000\r
+\r
+The queries don't really work after a database is closed, and we would\r
+like them to be freed if the database is destroyed.\r
+\r
+Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\r
+---\r
+ lib/query.cc | 2 +-\r
+ 1 file changed, 1 insertion(+), 1 deletion(-)\r
+\r
+diff --git a/lib/query.cc b/lib/query.cc\r
+index 69668a4..ec60e2e 100644\r
+--- a/lib/query.cc\r
++++ b/lib/query.cc\r
+@@ -80,7 +80,7 @@ notmuch_query_create (notmuch_database_t *notmuch,\r
+     if (_debug_query ())\r
+       fprintf (stderr, "Query string is:\n%s\n", query_string);\r
\r
+-    query = talloc (NULL, notmuch_query_t);\r
++    query = talloc (notmuch, notmuch_query_t);\r
+     if (unlikely (query == NULL))\r
+       return NULL;\r
\r
+-- \r
+1.8.4-fc\r
+\r