Check if ALTER is supported

This commit is contained in:
Sebastian Ramacher 2019-01-20 20:12:36 +01:00
parent 797535aceb
commit 32dfdc0dd3
3 changed files with 9 additions and 2 deletions

2
README
View file

@ -15,7 +15,7 @@ The following dependencies are required:
The following dependencies are optional:
* sqlite3 (>= 3.5.9): splite3 database backend
* sqlite3 (>= 3.6.23): splite3 database backend
* libmagic from file(1): for mime-type detection
* libsynctex from TeXLive: SyncTeX support
* libseccomp: sandbox support

View file

@ -68,7 +68,7 @@ flags = cc.get_supported_arguments(flags)
# optional dependencies
additional_sources = []
sqlite = dependency('sqlite3', version: '>=3.5.9', required: get_option('sqlite'))
sqlite = dependency('sqlite3', version: '>=3.6.23', required: get_option('sqlite'))
synctex = dependency('synctex', required: get_option('synctex'))
magic = cc.find_library('magic', required: get_option('magic'))
seccomp = dependency('libseccomp', required: get_option('seccomp'))

View file

@ -251,6 +251,13 @@ sqlite_db_check_layout(sqlite3* session, const int database_version, const bool
if (new_db == true)
return;
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
if (sqlite3_compileoption_used("SQLITE_OMIT_ALTERTABLE") == 1) {
girara_error("sqlite3 built without support for ALTER, cannot update database");
return;
}
#endif
bool all_updates_ok = true;
if (database_version < 1)
{