|
|
@@ -123,7 +123,7 @@ extern "C" {
|
|
|
*/
|
|
|
#define SQLITE_VERSION "3.21.0"
|
|
|
#define SQLITE_VERSION_NUMBER 3021000
|
|
|
-#define SQLITE_SOURCE_ID "2017-08-01 00:20:34 95e8f31658254dd2df3eeaae337aff0fe2125d170ae966c74f4fc70400e099b1"
|
|
|
+#define SQLITE_SOURCE_ID "2017-08-10 03:27:27 e49279e65169a939b6058a0960dc1fe09ce4ee2d78992a1969773cbc7ce1043b"
|
|
|
|
|
|
/*
|
|
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
|
@@ -507,6 +507,9 @@ SQLITE_API int sqlite3_exec(
|
|
|
#define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26<<8))
|
|
|
#define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27<<8))
|
|
|
#define SQLITE_IOERR_AUTH (SQLITE_IOERR | (28<<8))
|
|
|
+#define SQLITE_IOERR_BEGIN_ATOMIC (SQLITE_IOERR | (29<<8))
|
|
|
+#define SQLITE_IOERR_COMMIT_ATOMIC (SQLITE_IOERR | (30<<8))
|
|
|
+#define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8))
|
|
|
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
|
|
|
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
|
|
|
#define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8))
|
|
|
@@ -595,6 +598,11 @@ SQLITE_API int sqlite3_exec(
|
|
|
** SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on
|
|
|
** read-only media and cannot be changed even by processes with
|
|
|
** elevated privileges.
|
|
|
+**
|
|
|
+** The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying
|
|
|
+** filesystem supports doing multiple write operations atomically when those
|
|
|
+** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
|
|
|
+** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
|
|
|
*/
|
|
|
#define SQLITE_IOCAP_ATOMIC 0x00000001
|
|
|
#define SQLITE_IOCAP_ATOMIC512 0x00000002
|
|
|
@@ -610,6 +618,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800
|
|
|
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
|
|
|
#define SQLITE_IOCAP_IMMUTABLE 0x00002000
|
|
|
+#define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
|
|
|
|
|
|
/*
|
|
|
** CAPI3REF: File Locking Levels
|
|
|
@@ -744,6 +753,7 @@ struct sqlite3_file {
|
|
|
** <li> [SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN]
|
|
|
** <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]
|
|
|
** <li> [SQLITE_IOCAP_IMMUTABLE]
|
|
|
+** <li> [SQLITE_IOCAP_BATCH_ATOMIC]
|
|
|
** </ul>
|
|
|
**
|
|
|
** The SQLITE_IOCAP_ATOMIC property means that all writes of
|
|
|
@@ -1027,6 +1037,40 @@ struct sqlite3_io_methods {
|
|
|
** The [SQLITE_FCNTL_RBU] opcode is implemented by the special VFS used by
|
|
|
** the RBU extension only. All other VFS should return SQLITE_NOTFOUND for
|
|
|
** this opcode.
|
|
|
+**
|
|
|
+** <li>[[SQLITE_FCNTL_BEGIN_ATOMIC_WRITE]]
|
|
|
+** If the [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] opcode returns SQLITE_OK, then
|
|
|
+** the file descriptor is placed in "batch write mode", which
|
|
|
+** means all subsequent write operations will be deferred and done
|
|
|
+** atomically at the next [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]. Systems
|
|
|
+** that do not support batch atomic writes will return SQLITE_NOTFOUND.
|
|
|
+** ^Following a successful SQLITE_FCNTL_BEGIN_ATOMIC_WRITE and prior to
|
|
|
+** the closing [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] or
|
|
|
+** [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE], SQLite will make
|
|
|
+** no VFS interface calls on the same [sqlite3_file] file descriptor
|
|
|
+** except for calls to the xWrite method and the xFileControl method
|
|
|
+** with [SQLITE_FCNTL_SIZE_HINT].
|
|
|
+**
|
|
|
+** <li>[[SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]]
|
|
|
+** The [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] opcode causes all write
|
|
|
+** operations since the previous successful call to
|
|
|
+** [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be performed atomically.
|
|
|
+** This file control returns [SQLITE_OK] if and only if the writes were
|
|
|
+** all performed successfully and have been committed to persistent storage.
|
|
|
+** ^Regardless of whether or not it is successful, this file control takes
|
|
|
+** the file descriptor out of batch write mode so that all subsequent
|
|
|
+** write operations are independent.
|
|
|
+** ^SQLite will never invoke SQLITE_FCNTL_COMMIT_ATOMIC_WRITE without
|
|
|
+** a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE].
|
|
|
+**
|
|
|
+** <li>[[SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE]]
|
|
|
+** The [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE] opcode causes all write
|
|
|
+** operations since the previous successful call to
|
|
|
+** [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be rolled back.
|
|
|
+** ^This file control takes the file descriptor out of batch write mode
|
|
|
+** so that all subsequent write operations are independent.
|
|
|
+** ^SQLite will never invoke SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE without
|
|
|
+** a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE].
|
|
|
** </ul>
|
|
|
*/
|
|
|
#define SQLITE_FCNTL_LOCKSTATE 1
|
|
|
@@ -1058,6 +1102,9 @@ struct sqlite3_io_methods {
|
|
|
#define SQLITE_FCNTL_JOURNAL_POINTER 28
|
|
|
#define SQLITE_FCNTL_WIN32_GET_HANDLE 29
|
|
|
#define SQLITE_FCNTL_PDB 30
|
|
|
+#define SQLITE_FCNTL_BEGIN_ATOMIC_WRITE 31
|
|
|
+#define SQLITE_FCNTL_COMMIT_ATOMIC_WRITE 32
|
|
|
+#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
|
|
|
|
|
|
/* deprecated names */
|
|
|
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|