Index: third_party/sqlite/src/src/pager.h |
diff --git a/third_party/sqlite/src/src/pager.h b/third_party/sqlite/src/src/pager.h |
index 3552a876e788610ac637ea8101301aa9b3f6d878..585ef2949794f910fdd15dcbb966b292147fa12a 100644 |
--- a/third_party/sqlite/src/src/pager.h |
+++ b/third_party/sqlite/src/src/pager.h |
@@ -14,8 +14,8 @@ |
** at a time and provides a journal for rollback. |
*/ |
-#ifndef _PAGER_H_ |
-#define _PAGER_H_ |
+#ifndef SQLITE_PAGER_H |
+#define SQLITE_PAGER_H |
/* |
** Default maximum size for persistent journal files. A negative |
@@ -68,7 +68,11 @@ typedef struct PgHdr DbPage; |
#define PAGER_LOCKINGMODE_EXCLUSIVE 1 |
/* |
-** Numeric constants that encode the journalmode. |
+** Numeric constants that encode the journalmode. |
+** |
+** The numeric values encoded here (other than PAGER_JOURNALMODE_QUERY) |
+** are exposed in the API via the "PRAGMA journal_mode" command and |
+** therefore cannot be changed without a compatibility break. |
*/ |
#define PAGER_JOURNALMODE_QUERY (-1) /* Query the value of journalmode */ |
#define PAGER_JOURNALMODE_DELETE 0 /* Commit by deleting journal file */ |
@@ -86,15 +90,21 @@ typedef struct PgHdr DbPage; |
/* |
** Flags for sqlite3PagerSetFlags() |
+** |
+** Value constraints (enforced via assert()): |
+** PAGER_FULLFSYNC == SQLITE_FullFSync |
+** PAGER_CKPT_FULLFSYNC == SQLITE_CkptFullFSync |
+** PAGER_CACHE_SPILL == SQLITE_CacheSpill |
*/ |
#define PAGER_SYNCHRONOUS_OFF 0x01 /* PRAGMA synchronous=OFF */ |
#define PAGER_SYNCHRONOUS_NORMAL 0x02 /* PRAGMA synchronous=NORMAL */ |
#define PAGER_SYNCHRONOUS_FULL 0x03 /* PRAGMA synchronous=FULL */ |
-#define PAGER_SYNCHRONOUS_MASK 0x03 /* Mask for three values above */ |
-#define PAGER_FULLFSYNC 0x04 /* PRAGMA fullfsync=ON */ |
-#define PAGER_CKPT_FULLFSYNC 0x08 /* PRAGMA checkpoint_fullfsync=ON */ |
-#define PAGER_CACHESPILL 0x10 /* PRAGMA cache_spill=ON */ |
-#define PAGER_FLAGS_MASK 0x1c /* All above except SYNCHRONOUS */ |
+#define PAGER_SYNCHRONOUS_EXTRA 0x04 /* PRAGMA synchronous=EXTRA */ |
+#define PAGER_SYNCHRONOUS_MASK 0x07 /* Mask for four values above */ |
+#define PAGER_FULLFSYNC 0x08 /* PRAGMA fullfsync=ON */ |
+#define PAGER_CKPT_FULLFSYNC 0x10 /* PRAGMA checkpoint_fullfsync=ON */ |
+#define PAGER_CACHESPILL 0x20 /* PRAGMA cache_spill=ON */ |
+#define PAGER_FLAGS_MASK 0x38 /* All above except SYNCHRONOUS */ |
/* |
** The remainder of this file contains the declarations of the functions |
@@ -112,7 +122,7 @@ int sqlite3PagerOpen( |
int, |
void(*)(DbPage*) |
); |
-int sqlite3PagerClose(Pager *pPager); |
+int sqlite3PagerClose(Pager *pPager, sqlite3*); |
int sqlite3PagerReadFileheader(Pager*, int, unsigned char*); |
/* Functions used to configure a Pager object. */ |
@@ -163,15 +173,21 @@ int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint); |
int sqlite3PagerSharedLock(Pager *pPager); |
#ifndef SQLITE_OMIT_WAL |
- int sqlite3PagerCheckpoint(Pager *pPager, int, int*, int*); |
+ int sqlite3PagerCheckpoint(Pager *pPager, sqlite3*, int, int*, int*); |
int sqlite3PagerWalSupported(Pager *pPager); |
int sqlite3PagerWalCallback(Pager *pPager); |
int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen); |
- int sqlite3PagerCloseWal(Pager *pPager); |
+ int sqlite3PagerCloseWal(Pager *pPager, sqlite3*); |
+# ifdef SQLITE_DIRECT_OVERFLOW_READ |
+ int sqlite3PagerUseWal(Pager *pPager, Pgno); |
+# endif |
# ifdef SQLITE_ENABLE_SNAPSHOT |
int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot); |
int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot); |
+ int sqlite3PagerSnapshotRecover(Pager *pPager); |
# endif |
+#else |
+# define sqlite3PagerUseWal(x,y) 0 |
#endif |
#ifdef SQLITE_ENABLE_ZIPVFS |
@@ -190,11 +206,10 @@ sqlite3_vfs *sqlite3PagerVfs(Pager*); |
sqlite3_file *sqlite3PagerFile(Pager*); |
sqlite3_file *sqlite3PagerJrnlFile(Pager*); |
const char *sqlite3PagerJournalname(Pager*); |
-int sqlite3PagerNosync(Pager*); |
void *sqlite3PagerTempSpace(Pager*); |
int sqlite3PagerIsMemdb(Pager*); |
void sqlite3PagerCacheStat(Pager *, int, int, int *); |
-void sqlite3PagerClearCache(Pager *); |
+void sqlite3PagerClearCache(Pager*); |
int sqlite3SectorSize(sqlite3_file *); |
/* Functions used to truncate the database file. */ |
@@ -221,4 +236,4 @@ void *sqlite3PagerCodec(DbPage *); |
# define enable_simulated_io_errors() |
#endif |
-#endif /* _PAGER_H_ */ |
+#endif /* SQLITE_PAGER_H */ |