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

Unified Diff: third_party/sqlite/src/test/corrupt2.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/conflict2.test ('k') | third_party/sqlite/src/test/corrupt3.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/corrupt2.test
diff --git a/third_party/sqlite/src/test/corrupt2.test b/third_party/sqlite/src/test/corrupt2.test
index 9bd29cf90fb6880c5e8eb8ce45f1dde781df942c..efeb26bc8a63ae6de92986ed852811ffae00ef04 100644
--- a/third_party/sqlite/src/test/corrupt2.test
+++ b/third_party/sqlite/src/test/corrupt2.test
@@ -346,27 +346,29 @@ ifcapable autovacuum {
} {1 {database disk image is malformed}}
}
- corruption_test -sqlprep {
- PRAGMA auto_vacuum = 1;
- PRAGMA page_size = 1024;
- CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
- INSERT INTO t1 VALUES(1, randomblob(2500));
- DELETE FROM t1 WHERE a = 1;
- } -corrupt {
- set nAppend [expr 1024*207 - [file size corrupt.db]]
- set fd [open corrupt.db r+]
- seek $fd 0 end
- puts -nonewline $fd [string repeat x $nAppend]
- close $fd
- hexio_write corrupt.db 28 00000000
- } -test {
- do_test corrupt2-6.4 {
- catchsql "
- $::presql
- BEGIN EXCLUSIVE;
- COMMIT;
- "
- } {1 {database disk image is malformed}}
+ if {![nonzero_reserved_bytes]} {
+ corruption_test -sqlprep {
+ PRAGMA auto_vacuum = 1;
+ PRAGMA page_size = 1024;
+ CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
+ INSERT INTO t1 VALUES(1, randomblob(2500));
+ DELETE FROM t1 WHERE a = 1;
+ } -corrupt {
+ set nAppend [expr 1024*207 - [file size corrupt.db]]
+ set fd [open corrupt.db r+]
+ seek $fd 0 end
+ puts -nonewline $fd [string repeat x $nAppend]
+ close $fd
+ hexio_write corrupt.db 28 00000000
+ } -test {
+ do_test corrupt2-6.4 {
+ catchsql "
+ $::presql
+ BEGIN EXCLUSIVE;
+ COMMIT;
+ "
+ } {1 {database disk image is malformed}}
+ }
}
}
« no previous file with comments | « third_party/sqlite/src/test/conflict2.test ('k') | third_party/sqlite/src/test/corrupt3.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698