mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Memory-mapped I/O is now on by default. The "PRAGMA mmap_limit(N)" can be
used to issue a hint to the VFS to limit mmap space to N bytes. The VFS is free to ignore that hint if desired. However, if "PRAGMA mmap_limit(0)" is used, xFetch is never called. FossilOrigin-Name: 1b37c4effdd03aa2ea938a71b4f22ed27391689b
This commit is contained in:
@ -123,7 +123,7 @@ foreach AutoVacuumMode [list 0 1] {
|
||||
forcedelete test.db test.db-journal
|
||||
|
||||
sqlite3 db test.db
|
||||
execsql "PRAGMA mmap_size = 0"
|
||||
execsql "PRAGMA mmap_limit = 0"
|
||||
execsql "PRAGMA auto_vacuum = $AutoVacuumMode"
|
||||
|
||||
do_test incrblob-2.$AutoVacuumMode.1 {
|
||||
@ -150,7 +150,7 @@ foreach AutoVacuumMode [list 0 1] {
|
||||
# Open and close the db to make sure the page cache is empty.
|
||||
db close
|
||||
sqlite3 db test.db
|
||||
execsql "PRAGMA mmap_size = 0"
|
||||
execsql "PRAGMA mmap_limit = 0"
|
||||
|
||||
# Read the last 20 bytes of the blob via a blob handle.
|
||||
set ::blob [db incrblob blobs v 1]
|
||||
@ -173,7 +173,7 @@ foreach AutoVacuumMode [list 0 1] {
|
||||
# Open and close the db to make sure the page cache is empty.
|
||||
db close
|
||||
sqlite3 db test.db
|
||||
execsql "PRAGMA mmap_size = 0"
|
||||
execsql "PRAGMA mmap_limit = 0"
|
||||
|
||||
# Write the second-to-last 20 bytes of the blob via a blob handle.
|
||||
#
|
||||
@ -203,7 +203,7 @@ foreach AutoVacuumMode [list 0 1] {
|
||||
# Open and close the db to make sure the page cache is empty.
|
||||
db close
|
||||
sqlite3 db test.db
|
||||
execsql { PRAGMA mmap_size = 0 }
|
||||
execsql { PRAGMA mmap_limit = 0 }
|
||||
|
||||
execsql { SELECT i FROM blobs }
|
||||
} {45}
|
||||
|
Reference in New Issue
Block a user