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

Unified Diff: third_party/sqlite/src/test/walcksum.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/walbak.test ('k') | third_party/sqlite/src/test/walcrash.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/walcksum.test
diff --git a/third_party/sqlite/src/test/walcksum.test b/third_party/sqlite/src/test/walcksum.test
index 3005a758acd1af0fbcf505991409524f2edf4ce6..f3fc427115cc86edf5282b62fe3b1e7a1d78d42d 100644
--- a/third_party/sqlite/src/test/walcksum.test
+++ b/third_party/sqlite/src/test/walcksum.test
@@ -334,59 +334,5 @@ do_test walcksum-2.1 {
catch { db close }
catch { db2 close }
-#-------------------------------------------------------------------------
-# Test case walcksum-3.* tests that the checksum calculation detects single
-# byte changes to frame or frame-header data and considers the frame
-# invalid as a result.
-#
-do_test walcksum-3.1 {
- forcedelete test.db test.db-wal test.db-journal
- sqlite3 db test.db
-
- execsql {
- PRAGMA synchronous = NORMAL;
- PRAGMA page_size = 1024;
- CREATE TABLE t1(a, b);
- INSERT INTO t1 VALUES(1, randomblob(300));
- INSERT INTO t1 VALUES(2, randomblob(300));
- PRAGMA journal_mode = WAL;
- INSERT INTO t1 VALUES(3, randomblob(300));
- }
-
- file size test.db-wal
-} [wal_file_size 1 1024]
-do_test walcksum-3.2 {
- forcecopy test.db-wal test2.db-wal
- forcecopy test.db test2.db
- sqlite3 db2 test2.db
- execsql { SELECT a FROM t1 } db2
-} {1 2 3}
-db2 close
-forcecopy test.db test2.db
-
-
-foreach incr {1 2 3 20 40 60 80 100 120 140 160 180 200 220 240 253 254 255} {
- do_test walcksum-3.3.$incr {
- set FAIL 0
- for {set iOff 0} {$iOff < [wal_file_size 1 1024]} {incr iOff} {
-
- forcecopy test.db-wal test2.db-wal
- set fd [open test2.db-wal r+]
- fconfigure $fd -encoding binary
- fconfigure $fd -translation binary
-
- seek $fd $iOff
- binary scan [read $fd 1] c x
- seek $fd $iOff
- puts -nonewline $fd [binary format c [expr {($x+$incr)&0xFF}]]
- close $fd
-
- sqlite3 db2 test2.db
- if { [execsql { SELECT a FROM t1 } db2] != "1 2" } {set FAIL 1}
- db2 close
- }
- set FAIL
- } {0}
-}
finish_test
« no previous file with comments | « third_party/sqlite/src/test/walbak.test ('k') | third_party/sqlite/src/test/walcrash.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698