1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Keep batch-atomic-writes turned on for journal_mode=MEMORY, but turn them

off for synchronous=OFF.  Refuse to compile with both SQLITE_MMAP_READWRITE
and SQLITE_ENABLE_BATCH_ATOMIC_WRITE.  Fix up some comments in the commit
logic.

FossilOrigin-Name: 2e80e19e4faac30947ed56aa3601c45c758cafb27f84780df255fdbcdc9a6999
This commit is contained in:
drh
2017-07-22 16:32:33 +00:00
parent d76dba7eb5
commit 2df9478f5f
4 changed files with 32 additions and 19 deletions

View File

@@ -630,6 +630,15 @@
# define SQLITE_DEFAULT_PCACHE_INITSZ 20
#endif
/*
** The compile-time options SQLITE_MMAP_READWRITE and
** SQLITE_ENABLE_BATCH_ATOMIC_WRITE are not compatible with one another.
** You must choose one or the other (or neither) but not both.
*/
#if defined(SQLITE_MMAP_READWRITE) && defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)
#error Cannot use both SQLITE_MMAP_READWRITE and SQLITE_ENABLE_BATCH_ATOMIC_WRITE
#endif
/*
** GCC does not define the offsetof() macro so we'll have to do it
** ourselves.