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

Unified Diff: third_party/sqlite/src/test/autovacuum.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/autoindex2.test ('k') | third_party/sqlite/src/test/backcompat.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/autovacuum.test
diff --git a/third_party/sqlite/src/test/autovacuum.test b/third_party/sqlite/src/test/autovacuum.test
index 9ee2cd0fa870b53202f293b454572dda2d52bd80..5c14ed85d3d28f46325e5052378ee41b404212f6 100644
--- a/third_party/sqlite/src/test/autovacuum.test
+++ b/third_party/sqlite/src/test/autovacuum.test
@@ -269,7 +269,7 @@ do_test autovacuum-2.4.3 {
} {3 4 5 6 7 8 9 10}
# Right now there are 5 free pages in the database. Consume and then free
-# a 520 pages. Then create 520 tables. This ensures that at least some of the
+# all 520 pages. Then create 520 tables. This ensures that at least some of the
# desired root-pages reside on the second free-list trunk page, and that the
# trunk itself is required at some point.
do_test autovacuum-2.4.4 {
@@ -280,9 +280,20 @@ do_test autovacuum-2.4.4 {
} {}
set root_page_list [list]
set pending_byte_page [expr ($::sqlite_pending_byte / 1024) + 1]
+
+# unusable_pages
+# These are either the pending_byte page or the pointer map pages
+#
+unset -nocomplain unusable_page
+if {[sqlite3 -has-codec]} {
+ array set unusable_page {205 1 408 1}
+} else {
+ array set unusable_page {207 1 412 1}
+}
+set unusable_page($pending_byte_page) 1
+
for {set i 3} {$i<=532} {incr i} {
- # 207 and 412 are pointer-map pages.
- if { $i!=207 && $i!=412 && $i != $pending_byte_page} {
+ if {![info exists unusable_page($i)]} {
lappend root_page_list $i
}
}
« no previous file with comments | « third_party/sqlite/src/test/autoindex2.test ('k') | third_party/sqlite/src/test/backcompat.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698