[PATCH v3 12/13] lib: Return an error from operations that require an upgrade

2014-07-31 Thread Austin Clements
Previously, there was no protection against a caller invoking an operation on an old database version that would effectively corrupt the database by treating it like a newer version. According to notmuch.h, any caller that opens the database in read/write mode is supposed to check if the database

[PATCH v3 12/13] lib: Return an error from operations that require an upgrade

2014-07-31 Thread Austin Clements
Previously, there was no protection against a caller invoking an operation on an old database version that would effectively corrupt the database by treating it like a newer version. According to notmuch.h, any caller that opens the database in read/write mode is supposed to check if the database