Index: third_party/sqlite/src/src/wal.h |
diff --git a/third_party/sqlite/src/src/wal.h b/third_party/sqlite/src/src/wal.h |
index 2039c701cf29bae49a7e984c4b1d59aa76683040..092546354b34c0ab3d20056a7f8a8a52e4d0b5f5 100644 |
--- a/third_party/sqlite/src/src/wal.h |
+++ b/third_party/sqlite/src/src/wal.h |
@@ -19,12 +19,18 @@ |
#include "sqliteInt.h" |
+/* Additional values that can be added to the sync_flags argument of |
+** sqlite3WalFrames(): |
+*/ |
+#define WAL_SYNC_TRANSACTIONS 0x20 /* Sync at the end of each transaction */ |
+#define SQLITE_SYNC_MASK 0x13 /* Mask off the SQLITE_SYNC_* values */ |
+ |
#ifdef SQLITE_OMIT_WAL |
# define sqlite3WalOpen(x,y,z) 0 |
+# define sqlite3WalLimit(x,y) |
# define sqlite3WalClose(w,x,y,z) 0 |
# define sqlite3WalBeginReadTransaction(y,z) 0 |
# define sqlite3WalEndReadTransaction(z) |
-# define sqlite3WalRead(v,w,x,y,z) 0 |
# define sqlite3WalDbsize(y) 0 |
# define sqlite3WalBeginWriteTransaction(y) 0 |
# define sqlite3WalEndWriteTransaction(x) 0 |
@@ -36,6 +42,8 @@ |
# define sqlite3WalCallback(z) 0 |
# define sqlite3WalExclusiveMode(y,z) 0 |
# define sqlite3WalHeapMemory(z) 0 |
+# define sqlite3WalFramesize(z) 0 |
+# define sqlite3WalFindFrame(x,y,z) 0 |
#else |
#define WAL_SAVEPOINT_NDATA 4 |
@@ -46,9 +54,12 @@ |
typedef struct Wal Wal; |
/* Open and close a connection to a write-ahead log. */ |
-int sqlite3WalOpen(sqlite3_vfs*, sqlite3_file*, const char *zName, int, Wal**); |
+int sqlite3WalOpen(sqlite3_vfs*, sqlite3_file*, const char *, int, i64, Wal**); |
int sqlite3WalClose(Wal *pWal, int sync_flags, int, u8 *); |
+/* Set the limiting size of a WAL file. */ |
+void sqlite3WalLimit(Wal*, i64); |
+ |
/* Used by readers to open (lock) and close (unlock) a snapshot. A |
** snapshot is like a read-transaction. It is the state of the database |
** at an instant in time. sqlite3WalOpenSnapshot gets a read lock and |
@@ -60,7 +71,8 @@ int sqlite3WalBeginReadTransaction(Wal *pWal, int *); |
void sqlite3WalEndReadTransaction(Wal *pWal); |
/* Read a page from the write-ahead log, if it is present. */ |
-int sqlite3WalRead(Wal *pWal, Pgno pgno, int *pInWal, int nOut, u8 *pOut); |
+int sqlite3WalFindFrame(Wal *, Pgno, u32 *); |
+int sqlite3WalReadFrame(Wal *, u32, int, u8 *); |
/* If the WAL is not empty, return the size of the database. */ |
Pgno sqlite3WalDbsize(Wal *pWal); |
@@ -114,5 +126,12 @@ int sqlite3WalExclusiveMode(Wal *pWal, int op); |
*/ |
int sqlite3WalHeapMemory(Wal *pWal); |
+#ifdef SQLITE_ENABLE_ZIPVFS |
+/* If the WAL file is not empty, return the number of bytes of content |
+** stored in each frame (i.e. the db page-size when the WAL was created). |
+*/ |
+int sqlite3WalFramesize(Wal *pWal); |
+#endif |
+ |
#endif /* ifndef SQLITE_OMIT_WAL */ |
#endif /* _WAL_H_ */ |