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

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

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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/unordered.test ('k') | third_party/sqlite/src/test/vacuum2.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/vacuum.test
diff --git a/third_party/sqlite/src/test/vacuum.test b/third_party/sqlite/src/test/vacuum.test
index 4b1cd5a3e60366f41bbbaad282920e94d1dd3171..34be57ce7c8c3261c52c8f565c13127698304630 100644
--- a/third_party/sqlite/src/test/vacuum.test
+++ b/third_party/sqlite/src/test/vacuum.test
@@ -54,6 +54,19 @@ do_test vacuum-1.1 {
set ::cksum [cksum]
expr {$::cksum!=""}
} {1}
+
+# Create bogus application-defined functions for functions used
+# internally by VACUUM, to ensure that VACUUM falls back
+# to the built-in functions.
+#
+proc failing_app_func {args} {error "bad function"}
+do_test vacuum-1.1b {
+ db func substr failing_app_func
+ db func like failing_app_func
+ db func quote failing_app_func
+ catchsql {SELECT substr(name,1,3) FROM sqlite_master}
+} {1 {bad function}}
+
do_test vacuum-1.2 {
execsql {
VACUUM;
@@ -287,14 +300,38 @@ do_test vacuum-7.0 {
CREATE TABLE t1(t);
VACUUM;
} db2
+} {}
+do_test vacuum-7.1 {
execsql {
CREATE TABLE t2(t);
CREATE TABLE t3(t);
DROP TABLE t2;
+ PRAGMA freelist_count;
+ }
+} {1}
+do_test vacuum-7.2 {
+ execsql {
VACUUM;
pragma integrity_check;
} db2
} {ok}
+do_test vacuum-7.3 {
+ execsql { PRAGMA freelist_count; } db2
+} {0}
+ifcapable autovacuum {
+ do_test vacuum-7.4 {
+ execsql { PRAGMA auto_vacuum } db2
+ } {0}
+ do_test vacuum-7.5 {
+ execsql { PRAGMA auto_vacuum = 1} db2
+ execsql { PRAGMA auto_vacuum } db2
+ } {0}
+ do_test vacuum-7.6 {
+ execsql { PRAGMA auto_vacuum = 1} db2
+ execsql { VACUUM } db2
+ execsql { PRAGMA auto_vacuum } db2
+ } {1}
+}
db2 close
# Ticket #873. VACUUM a database that has ' in its name.
« no previous file with comments | « third_party/sqlite/src/test/unordered.test ('k') | third_party/sqlite/src/test/vacuum2.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698