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

Take advantage of atomic-write capabilities in the F2FS filesystem when the

database is stored on such a filesystem.  This is a compile-time option
activated using SQLITE_ENABLE_BATCH_ATOMIC_WRITE.

FossilOrigin-Name: 24190b221f73472dafaead6de101b4debc2c91c1ca28d70b45a38df5bb61fb39
This commit is contained in:
drh
2017-08-01 14:16:15 +00:00
19 changed files with 740 additions and 183 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.
@@ -4287,7 +4296,8 @@ int sqlite3FindInIndex(Parse *, Expr *, u32, int*, int*);
int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int);
int sqlite3JournalSize(sqlite3_vfs *);
#ifdef SQLITE_ENABLE_ATOMIC_WRITE
#if defined(SQLITE_ENABLE_ATOMIC_WRITE) \
|| defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)
int sqlite3JournalCreate(sqlite3_file *);
#endif