summaryrefslogtreecommitdiffstats
path: root/third_party/sqlite/src/test/vacuum.test
diff options
context:
space:
mode:
authorScott Hess <shess@chromium.org>2015-02-10 13:33:29 -0800
committerScott Hess <shess@chromium.org>2015-02-10 21:37:23 +0000
commitdcf12048055030a2b5858ceca5ce26294a82a6e4 (patch)
treec84f0e56702c610d82cf961829c6766d281dc98b /third_party/sqlite/src/test/vacuum.test
parent22a8af1afb44b29cfcee081f492ac1f434b54201 (diff)
downloadchromium_src-dcf12048055030a2b5858ceca5ce26294a82a6e4.zip
chromium_src-dcf12048055030a2b5858ceca5ce26294a82a6e4.tar.gz
chromium_src-dcf12048055030a2b5858ceca5ce26294a82a6e4.tar.bz2
Import SQLite 3.8.7.4.
Ran through the import script in third_party/sqlite/README.Chromium, including the SQLite test suite. There are a few pager errors which are because of a change required for WebDatabase support (documented in README). SQLite changes are at http://www.sqlite.org/changes.html , Chromium previously used 3.7.6.3. All patches were applied and the results reviewed to make sure backported patches were safe to remove, and retained patches were still covering what was necessary. Keep fts4 disabled, and also the new fts3 virtual table and unicode61 tokenizer. Once enabled, these are very hard to disable, and there doesn't seem to be any pressure to enable them. Other SQLITE_* flags were reviewed for applicability, none looked essential. Fixes to Chromium: - In recovery.cc, pk_column now follows the documentation. - Short garbage files now see SQLITE_NOTADB rather than SQLITE_IOERR_SHORT_READ. - Adjust to allow clients to use ScopedErrorIgnore without adding dependencies. - More-specific SQLITE_CONSTRAINT_* errors aren't necessary. - Force recovery test to scan table rather than index. BUG=340757 TEST=*EVERYTHING* continues to work. R=michaeln@chromium.org Review URL: https://codereview.chromium.org/901033002 Cr-Commit-Position: refs/heads/master@{#315646}
Diffstat (limited to 'third_party/sqlite/src/test/vacuum.test')
-rw-r--r--third_party/sqlite/src/test/vacuum.test30
1 files changed, 23 insertions, 7 deletions
diff --git a/third_party/sqlite/src/test/vacuum.test b/third_party/sqlite/src/test/vacuum.test
index 34be57c..57429c2 100644
--- a/third_party/sqlite/src/test/vacuum.test
+++ b/third_party/sqlite/src/test/vacuum.test
@@ -208,7 +208,7 @@ db3 close
do_test vacuum-3.1 {
db close
db2 close
- file delete test.db
+ delete_file test.db
sqlite3 db test.db
execsql {
PRAGMA empty_result_callbacks=on;
@@ -234,7 +234,7 @@ do_test vacuum-4.2 {
ifcapable view {
do_test vacuum-5.1 {
db close
- file delete -force test.db
+ forcedelete test.db
sqlite3 db test.db
catchsql {
CREATE TABLE Test (TestID int primary key);
@@ -290,10 +290,10 @@ ifcapable {bloblit} {
}
# Check what happens when an in-memory database is vacuumed. The
-# [file delete] command covers us in case the library was compiled
+# [delete_file] command covers us in case the library was compiled
# without in-memory database support.
#
-file delete -force :memory:
+forcedelete :memory:
do_test vacuum-7.0 {
sqlite3 db2 :memory:
execsql {
@@ -337,8 +337,8 @@ db2 close
# Ticket #873. VACUUM a database that has ' in its name.
#
do_test vacuum-8.1 {
- file delete -force a'z.db
- file delete -force a'z.db-journal
+ forcedelete a'z.db
+ forcedelete a'z.db-journal
sqlite3 db2 a'z.db
execsql {
CREATE TABLE t1(t);
@@ -383,6 +383,22 @@ ifcapable {autoinc} {
} $::cksum
}
-file delete -force {a'z.db}
+forcedelete {a'z.db}
+
+# Test that "PRAGMA count_changes" does not interfere with VACUUM or cause
+# it to return any rows to the user.
+#
+do_test vacuum-10.1 {
+ db close
+ forcedelete test.db
+ sqlite3 db test.db
+ execsql {
+ CREATE TABLE t8(a, b);
+ INSERT INTO t8 VALUES('a', 'b');
+ INSERT INTO t8 VALUES('c', 'd');
+ PRAGMA count_changes = 1;
+ }
+} {}
+do_test vacuum-10.2 { execsql VACUUM } {}
finish_test