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

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

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/filectrl.test ('k') | third_party/sqlite/src/test/fkey1.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/filefmt.test
diff --git a/third_party/sqlite/src/test/filefmt.test b/third_party/sqlite/src/test/filefmt.test
index 72edbeebc79b844d4cd01099ba27f0413c8b60a3..2df142443602e1a8914b191e31f87ffa0d89b256 100644
--- a/third_party/sqlite/src/test/filefmt.test
+++ b/third_party/sqlite/src/test/filefmt.test
@@ -23,7 +23,7 @@ source $testdir/tester.tcl
do_not_use_codec
db close
-file delete -force test.db test.db-journal
+forcedelete test.db test.db-journal
# Database begins with valid 16-byte header string.
#
@@ -63,7 +63,7 @@ ifcapable pager_pragmas {
&& $pagesize>$SQLITE_MAX_PAGE_SIZE} continue
do_test filefmt-1.5.$pagesize.1 {
db close
- file delete -force test.db
+ forcedelete test.db
sqlite3 db test.db
db eval "PRAGMA auto_vacuum=OFF"
db eval "PRAGMA page_size=$pagesize"
@@ -105,7 +105,7 @@ do_test filefmt-1.7 {
ifcapable pager_pragmas {
do_test filefmt-1.8 {
db close
- file delete -force test.db
+ forcedelete test.db
sqlite3 db test.db
db eval {PRAGMA page_size=512; CREATE TABLE t1(x)}
db close
@@ -125,7 +125,7 @@ ifcapable pager_pragmas {
# always derives this from the size of the file.
#
db close
-file delete -force test.db
+forcedelete test.db
set a_string_counter 1
proc a_string {n} {
@@ -157,7 +157,7 @@ integrity_check filefmt-2.1.5
do_test filefmt-2.1.6 { hexio_read test.db 28 4 } {00000010}
db close
-file delete -force test.db
+forcedelete test.db
sqlite3 db test.db
db func a_string a_string
@@ -213,4 +213,38 @@ do_execsql_test filefmt-3.3 {
PRAGMA integrity_check;
} {ok}
+reset_db
+do_execsql_test filefmt-4.1 {
+ PRAGMA auto_vacuum = 1;
+ CREATE TABLE t1(x, y);
+ CREATE TABLE t2(x, y);
+
+ INSERT INTO t1 VALUES(randomblob(100), randomblob(100));
+ INSERT INTO t1 VALUES(randomblob(100), randomblob(100));
+ INSERT INTO t1 VALUES(randomblob(100), randomblob(100));
+ INSERT INTO t1 VALUES(randomblob(100), randomblob(100));
+ INSERT INTO t1 VALUES(randomblob(100), randomblob(100));
+ INSERT INTO t1 VALUES(randomblob(100), randomblob(100));
+
+ INSERT INTO t2 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t2 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t2 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t2 SELECT randomblob(100), randomblob(100) FROM t1;
+}
+
+do_test filefmt-4.2 {
+ sql36231 { INSERT INTO t2 SELECT * FROM t1 }
+} {}
+
+do_test filefmt-4.3 {
+ forcedelete bak.db
+ db backup bak.db
+} {}
+
+do_test filefmt-4.4 {
+ sqlite3 db2 bak.db
+ db2 eval { PRAGMA integrity_check }
+} {ok}
+db2 close
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/filectrl.test ('k') | third_party/sqlite/src/test/fkey1.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698