aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/os_unix.c2
-rw-r--r--src/os_win.c2
-rw-r--r--src/pager.c4
-rw-r--r--src/sqlite.h.in14
4 files changed, 12 insertions, 10 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index d99965821..c13c5cece 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4128,7 +4128,7 @@ static void setDeviceCharacteristics(unixFile *pFd){
if( pFd->ctrlFlags & UNIXFILE_PSOW ){
pFd->deviceCharacteristics |= SQLITE_IOCAP_POWERSAFE_OVERWRITE;
}
- pFd->deviceCharacteristics |= SQLITE_IOCAP_BYPASS;
+ pFd->deviceCharacteristics |= SQLITE_IOCAP_SUBPAGE_READ;
pFd->sectorSize = SQLITE_DEFAULT_SECTOR_SIZE;
}
diff --git a/src/os_win.c b/src/os_win.c
index 47fff58cc..97743412e 100644
--- a/src/os_win.c
+++ b/src/os_win.c
@@ -3660,7 +3660,7 @@ static int winSectorSize(sqlite3_file *id){
*/
static int winDeviceCharacteristics(sqlite3_file *id){
winFile *p = (winFile*)id;
- return SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN | SQLITE_IOCAP_BYPASS |
+ return SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN | SQLITE_IOCAP_SUBPAGE_READ |
((p->ctrlFlags & WINFILE_PSOW)?SQLITE_IOCAP_POWERSAFE_OVERWRITE:0);
}
diff --git a/src/pager.c b/src/pager.c
index 1b624a300..baaf4afbf 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -809,7 +809,7 @@ static const unsigned char aJournalMagic[] = {
** by the b-tree layer. This is the case if:
**
** (1) the database file is open
-** (2) the VFS for the database has BYPASS capability
+** (2) the VFS for the database is able to do unaligned sub-page reads
** (3) there are no dirty pages in the cache, and
** (4) the desired page is not currently in the wal file.
*/
@@ -819,7 +819,7 @@ int sqlite3PagerDirectReadOk(Pager *pPager, Pgno pgno){
if( pPager->fd->pMethods==0 ) return 0; /* Case (1) */
assert( pPager->fd->pMethods->xDeviceCharacteristics!=0 );
if( (pPager->fd->pMethods->xDeviceCharacteristics(pPager->fd)
- & SQLITE_IOCAP_BYPASS)==0 ){
+ & SQLITE_IOCAP_SUBPAGE_READ)==0 ){
return 0; /* Case (2) */
}
if( sqlite3PCacheIsDirty(pPager->pPCache) ) return 0; /* Failed (3) */
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index 2db643b28..f91088a77 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -653,10 +653,12 @@ int sqlite3_exec(
** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
**
-** The SQLITE_IOCAP_BYPASS property means that it is ok for the
-** B-tree layer to bypass the pager and VFS and read content directly
-** from the filesystem (the SQLITE_DIRECT_OVERFLOW_READ optimization)
-** when that is beneficial for performance.
+** The SQLITE_IOCAP_SUBPAGE_READ property means that it is ok to read
+** from the database file in amounts that are not a multiple of the
+** page size and that do not begin at a page boundary. Without this
+** property, SQLite is careful to only do full-page reads and write
+** on aligned pages, with the one exception that it will do a sub-page
+** read of the first page to access the database header.
*/
#define SQLITE_IOCAP_ATOMIC 0x00000001
#define SQLITE_IOCAP_ATOMIC512 0x00000002
@@ -673,7 +675,7 @@ int sqlite3_exec(
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
#define SQLITE_IOCAP_IMMUTABLE 0x00002000
#define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
-#define SQLITE_IOCAP_BYPASS 0x00008000
+#define SQLITE_IOCAP_SUBPAGE_READ 0x00008000
/*
** CAPI3REF: File Locking Levels
@@ -820,7 +822,7 @@ struct sqlite3_file {
** <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]
** <li> [SQLITE_IOCAP_IMMUTABLE]
** <li> [SQLITE_IOCAP_BATCH_ATOMIC]
-** <li> [SQLITE_IOCAP_BYPASS]
+** <li> [SQLITE_IOCAP_SUBPAGE_READ]
** </ul>
**
** The SQLITE_IOCAP_ATOMIC property means that all writes of