Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Unified Diff: third_party/sqlite/src/test/memsubsys1.test

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/memdb.test ('k') | third_party/sqlite/src/test/memsubsys2.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/memsubsys1.test
diff --git a/third_party/sqlite/src/test/memsubsys1.test b/third_party/sqlite/src/test/memsubsys1.test
index 8cc7c2afc1e7cabae979d575b98b262b9e235711..8265ce63174d1ebd8cd23368d9e671902f15cf74 100644
--- a/third_party/sqlite/src/test/memsubsys1.test
+++ b/third_party/sqlite/src/test/memsubsys1.test
@@ -25,6 +25,8 @@ if {[permutation] == "memsubsys1"} {
return
}
+test_set_config_pagecache 0 0
+
# This procedure constructs a new database in test.db. It fills
# this database with many small records (enough to force multiple
# rebalance operations in the btree-layer and to require a large
@@ -75,6 +77,7 @@ set xtra_size 290
db close
sqlite3_shutdown
sqlite3_config_lookaside 0 0
+sqlite3_config_pagecache 0 0
sqlite3_initialize
reset_highwater_marks
build_test_db memsubsys1-1 {PRAGMA page_size=1024}
@@ -115,10 +118,10 @@ do_test memsubsys1-2.5 {
db close
sqlite3_shutdown
sqlite3_config_pagecache [expr 512+$xtra_size] 20
+sqlite3_config singlethread
sqlite3_initialize
reset_highwater_marks
build_test_db memsubsys1-3.1 {PRAGMA page_size=1024}
-#show_memstats
do_test memsubsys1-3.1.3 {
set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2]
} 0
@@ -176,20 +179,20 @@ do_test memsubsys1-4.6 {
set s_used [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_USED 0] 2]
} 1
-# Test 5: Activate both PAGECACHE and SCRATCH. But make the page size
+# Test 5: Activate both PAGECACHE and SCRATCH. But make the page size is
# such that the SCRATCH allocations are too small.
#
db close
sqlite3_shutdown
sqlite3_config_pagecache [expr 4096+$xtra_size] 24
-sqlite3_config_scratch 6000 2
+sqlite3_config_scratch 4000 2
sqlite3_initialize
reset_highwater_marks
build_test_db memsubsys1-5 {PRAGMA page_size=4096}
#show_memstats
do_test memsubsys1-5.3 {
set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2]
-} 24
+} {/^2[34]$/}
do_test memsubsys1-5.4 {
set maxreq [lindex [sqlite3_status SQLITE_STATUS_MALLOC_SIZE 0] 2]
expr {$maxreq>4096}
@@ -215,7 +218,7 @@ build_test_db memsubsys1-6 {PRAGMA page_size=4096}
#show_memstats
do_test memsubsys1-6.3 {
set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2]
-} 24
+} {/^2[34]$/}
#do_test memsubsys1-6.4 {
# set maxreq [lindex [sqlite3_status SQLITE_STATUS_MALLOC_SIZE 0] 2]
# expr {$maxreq>4096 && $maxreq<=(4096+$xtra_size)}
@@ -309,9 +312,11 @@ do_test memsubsys1-8.4 {
db close
sqlite3_shutdown
sqlite3_config_memstatus 1
-sqlite3_config_pagecache 0 0
sqlite3_config_scratch 0 0
sqlite3_config_lookaside 100 500
+sqlite3_config serialized
sqlite3_initialize
autoinstall_test_functions
+
+test_restore_config_pagecache
finish_test
« no previous file with comments | « third_party/sqlite/src/test/memdb.test ('k') | third_party/sqlite/src/test/memsubsys2.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698