Index: third_party/sqlite/src/test/corruptA.test |
diff --git a/third_party/sqlite/src/test/corruptA.test b/third_party/sqlite/src/test/corruptA.test |
index fa3257f3df4fef388db73f9191114cb7cc5dd2af..9c7d228f4a502b69356e8d66e565ac0c4ec52429 100644 |
--- a/third_party/sqlite/src/test/corruptA.test |
+++ b/third_party/sqlite/src/test/corruptA.test |
@@ -19,6 +19,11 @@ |
set testdir [file dirname $argv0] |
source $testdir/tester.tcl |
+# Do not use a codec for tests in this file, as the database file is |
+# manipulated directly using tcl scripts (using the [hexio_write] command). |
+# |
+do_not_use_codec |
+ |
# Create a database to work with. |
# |
@@ -37,9 +42,11 @@ integrity_check corruptA-1.2 |
db close |
file copy -force test.db test.db-template |
+set unreadable_version 02 |
+ifcapable wal { set unreadable_version 03 } |
do_test corruptA-2.1 { |
file copy -force test.db-template test.db |
- hexio_write test.db 19 02 ;# the read format number |
+ hexio_write test.db 19 $unreadable_version ;# the read format number |
sqlite3 db test.db |
catchsql {SELECT * FROM t1} |
} {1 {file is encrypted or is not a database}} |