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

Side by Side Diff: third_party/sqlite/src/test/memsubsys1.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/mallocL.test ('k') | third_party/sqlite/src/test/minmax.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2008 June 18 1 # 2008 June 18
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 # Test 2: Activate PAGECACHE with 20 pages 93 # Test 2: Activate PAGECACHE with 20 pages
94 # 94 #
95 db close 95 db close
96 sqlite3_shutdown 96 sqlite3_shutdown
97 sqlite3_config_pagecache [expr 1024+$xtra_size] 20 97 sqlite3_config_pagecache [expr 1024+$xtra_size] 20
98 sqlite3_initialize 98 sqlite3_initialize
99 reset_highwater_marks 99 reset_highwater_marks
100 build_test_db memsubsys1-2 {PRAGMA page_size=1024; PRAGMA mmap_size=0} 100 build_test_db memsubsys1-2 {PRAGMA page_size=1024; PRAGMA mmap_size=0}
101 #show_memstats 101 #show_memstats
102 set MEMORY_MANAGEMENT $sqlite_options(memorymanage) 102 set MEMORY_MANAGEMENT $sqlite_options(memorymanage)
103 ifcapable !malloc_usable_size { 103 ifcapable pagecache_overflow_stats {
104 do_test memsubsys1-2.3 { 104 ifcapable !malloc_usable_size {
105 set pg_ovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2] 105 do_test memsubsys1-2.3 {
106 } [expr ($TEMP_STORE>1 || $MEMORY_MANAGEMENT==0)*1024] 106 set pg_ovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2]
107 } [expr ($TEMP_STORE>1 || $MEMORY_MANAGEMENT==0)*1024]
108 }
107 } 109 }
108 do_test memsubsys1-2.4 { 110 do_test memsubsys1-2.4 {
109 set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2] 111 set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2]
110 } 20 112 } 20
111 do_test memsubsys1-2.5 { 113 do_test memsubsys1-2.5 {
112 set s_used [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_USED 0] 2] 114 set s_used [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_USED 0] 2]
113 } 0 115 } 0
114 116
115 # Test 3: Activate PAGECACHE with 20 pages but use the wrong page size 117 # Test 3: Activate PAGECACHE with 20 pages but use the wrong page size
116 # so that PAGECACHE is not used. 118 # so that PAGECACHE is not used.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 #show_memstats 250 #show_memstats
249 do_test memsubsys1-7.3 { 251 do_test memsubsys1-7.3 {
250 set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2] 252 set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2]
251 expr {$pg_used<24} 253 expr {$pg_used<24}
252 } 1 254 } 1
253 do_test memsubsys1-7.4 { 255 do_test memsubsys1-7.4 {
254 set pg_ovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2] 256 set pg_ovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2]
255 } 0 257 } 0
256 do_test memsubsys1-7.5 { 258 do_test memsubsys1-7.5 {
257 set maxreq [lindex [sqlite3_status SQLITE_STATUS_MALLOC_SIZE 0] 2] 259 set maxreq [lindex [sqlite3_status SQLITE_STATUS_MALLOC_SIZE 0] 2]
258 expr {$maxreq<4100} 260 expr {$maxreq<(4100 + 8200*[nonzero_reserved_bytes])}
259 } 1 261 } 1
260 do_test memsubsys1-7.6 { 262 do_test memsubsys1-7.6 {
261 set s_used [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_USED 0] 2] 263 set s_used [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_USED 0] 2]
262 } 1 264 } 1
263 do_test memsubsys1-7.7 { 265 do_test memsubsys1-7.7 {
264 set s_ovfl [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_OVERFLOW 0] 2] 266 set s_ovfl [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_OVERFLOW 0] 2]
265 } 0 267 } 0
266 268
267 # Test 8: Disable PAGECACHE. Make available SCRATCH zero. Verify that 269 # Test 8: Disable PAGECACHE. Make available SCRATCH zero. Verify that
268 # the SCRATCH overflow logic works. 270 # the SCRATCH overflow logic works.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 sqlite3_shutdown 315 sqlite3_shutdown
314 sqlite3_config_memstatus 1 316 sqlite3_config_memstatus 1
315 sqlite3_config_scratch 0 0 317 sqlite3_config_scratch 0 0
316 sqlite3_config_lookaside 100 500 318 sqlite3_config_lookaside 100 500
317 sqlite3_config serialized 319 sqlite3_config serialized
318 sqlite3_initialize 320 sqlite3_initialize
319 autoinstall_test_functions 321 autoinstall_test_functions
320 322
321 test_restore_config_pagecache 323 test_restore_config_pagecache
322 finish_test 324 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/mallocL.test ('k') | third_party/sqlite/src/test/minmax.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698