--- /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 olra.theworths.org (Postfix) with ESMTP id 89D67431FD9\r
+ for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 09:20:01 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.738\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.738 tagged_above=-999 required=5\r
+ tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_LOW=-0.7]\r
+ 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 Jin5SmFeJTix for <notmuch@notmuchmail.org>;\r
+ Thu, 15 Jan 2015 09:19:58 -0800 (PST)\r
+Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com\r
+ [74.125.82.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 24C04431FD5 for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 09:19:58 -0800\r
+ (PST)\r
+Received: by mail-wg0-f42.google.com with SMTP id k14so16229632wgh.1\r
+ for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 09:19:57 -0800 (PST)\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=wzK08QjoKRUVg/bT0rffPTKZCAXfSvGmgOyXTAuYJOs=;\r
+ b=jvy7hhnnWakVMLOP8qUMmWGGCYNj+Kb3Q77g1BTxLSm2S+ZQEG0zzA/Y94jxRl1gmE\r
+ WpJWqEGNG6ERUnB1jkGv6vF+vSFAYa5WvFzaIqlSa+IG1HVO/ttALW6b+hDNCVuHkqAD\r
+ kKuZFzAgq3gR+qPSxnr08vfH0N7dbQ+DBvKFmW41RIURaRE8pxHl5HRHQR0H21E4HhMG\r
+ erInMRCZK7R2YneyjXJY0G8j9csLVyfjaIaW5c35bSPxTD21sG3H8OIa1EJ91K62ADrR\r
+ 8AepoYm4bFsibBOGklKLGoVn7WK4KLd37l5fdAo4sLUDAhdoIobMLyuoFBYhOhPrMRNa\r
+ xZ4Q==\r
+X-Gm-Message-State:\r
+ ALoCoQnW41a/nqa87M0pRM3ObMo0lroGy0c9JaAX2ee1Z9GcF8yoC4YTKXSEoOpQW+BBOqHkYJd8\r
+X-Received: by 10.180.75.199 with SMTP id e7mr63214332wiw.21.1421342396384;\r
+ Thu, 15 Jan 2015 09:19:56 -0800 (PST)\r
+Received: from localhost (mobile-internet-bcee14-89.dhcp.inet.fi.\r
+ [188.238.20.89]) by mx.google.com with ESMTPSA id\r
+ js5sm23546868wid.11.2015.01.15.09.19.55\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Thu, 15 Jan 2015 09:19:55 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Todd <todd@electricoding.com>, notmuch@notmuchmail.org,\r
+ Austin Clements <aclements@csail.mit.edu>\r
+Subject: Re: [PATCH v2 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES\r
+ database feature\r
+In-Reply-To: <1421193628-2699-3-git-send-email-todd@electricoding.com>\r
+References: <1421193628-2699-1-git-send-email-todd@electricoding.com>\r
+ <1421193628-2699-3-git-send-email-todd@electricoding.com>\r
+User-Agent: Notmuch/0.19+19~g9060a1f (http://notmuchmail.org) Emacs/24.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Thu, 15 Jan 2015 19:20:08 +0200\r
+Message-ID: <87y4p47ygn.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.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: Thu, 15 Jan 2015 17:20:01 -0000\r
+\r
+\r
+Austin, would you mind having a look at this one please?\r
+\r
+Thanks,\r
+Jani.\r
+\r
+On Wed, 14 Jan 2015, Todd <todd@electricoding.com> wrote:\r
+> ---\r
+> lib/database-private.h | 15 ++++++++++++---\r
+> lib/database.cc | 10 ++++++++--\r
+> 2 files changed, 20 insertions(+), 5 deletions(-)\r
+>\r
+> diff --git a/lib/database-private.h b/lib/database-private.h\r
+> index 15e03cc..6d6fa2c 100644\r
+> --- a/lib/database-private.h\r
+> +++ b/lib/database-private.h\r
+> @@ -92,6 +92,14 @@ enum _notmuch_features {\r
+> *\r
+> * Introduced: version 3. */\r
+> NOTMUCH_FEATURE_GHOSTS = 1 << 4,\r
+> +\r
+> +\r
+> + /* If set, then the database was created after the introduction of\r
+> + * indexed mime types. If unset, then the database may contain a\r
+> + * mixture of messages with indexed and non-indexed mime types.\r
+> + *\r
+> + * Introduced: version 3. */\r
+> + NOTMUCH_FEATURE_INDEXED_MIMETYPES = 1 << 5,\r
+> };\r
+> \r
+> /* In C++, a named enum is its own type, so define bitwise operators\r
+> @@ -161,9 +169,10 @@ struct _notmuch_database {\r
+> \r
+> /* Current database features. If any of these are missing from a\r
+> * database, request an upgrade.\r
+> - * NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES is not included because\r
+> - * upgrade doesn't currently introduce the feature (though brand new\r
+> - * databases will have it). */\r
+> + * NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES and\r
+> + * NOTMUCH_FEATURE_INDEXED_MIMETYPES are not included because upgrade\r
+> + * doesn't currently introduce the features (though brand new databases\r
+> + * will have it). */\r
+> #define NOTMUCH_FEATURES_CURRENT \\r
+> (NOTMUCH_FEATURE_FILE_TERMS | NOTMUCH_FEATURE_DIRECTORY_DOCS | \\r
+> NOTMUCH_FEATURE_BOOL_FOLDER | NOTMUCH_FEATURE_GHOSTS)\r
+> diff --git a/lib/database.cc b/lib/database.cc\r
+> index 3601f9d..2de60f8 100644\r
+> --- a/lib/database.cc\r
+> +++ b/lib/database.cc\r
+> @@ -304,6 +304,11 @@ static const struct {\r
+> "exact folder:/path: search", "rw" },\r
+> { NOTMUCH_FEATURE_GHOSTS,\r
+> "mail documents for missing messages", "w"},\r
+> + /* Knowledge of the index mime-types are not required for reading\r
+> + * a database because a reader will just be unable to query\r
+> + * them. */\r
+> + { NOTMUCH_FEATURE_INDEXED_MIMETYPES,\r
+> + "mime-types in database", "w"},\r
+> };\r
+> \r
+> const char *\r
+> @@ -646,9 +651,10 @@ notmuch_database_create (const char *path, notmuch_database_t **database)\r
+> if (status)\r
+> goto DONE;\r
+> \r
+> - /* Upgrade doesn't add this feature to existing databases, but new\r
+> - * databases have it. */\r
+> + /* Upgrade doesn't add these feature to existing databases, but\r
+> + * new databases have them. */\r
+> notmuch->features |= NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES;\r
+> + notmuch->features |= NOTMUCH_FEATURE_INDEXED_MIMETYPES;\r
+> \r
+> status = notmuch_database_upgrade (notmuch, NULL, NULL);\r
+> if (status) {\r
+> -- \r
+> 1.9.1\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r