add a test to verify that it is possible to open a 1.1.8 database when changing cipher_use_hmac pragma

This commit is contained in:
Stephen Lombardo 2011-02-17 11:50:24 -05:00
parent ffcb4f7fd9
commit dd911f3023
2 changed files with 13 additions and 0 deletions

BIN
sqlcipher-1.1.8-testkey.db Normal file

Binary file not shown.

View File

@ -677,5 +677,18 @@ do_test nohmac-not-tamper-resistent {
db close
file delete -force test.db
# test a large number of inserts in a transaction for multiple pages
do_test open-1.1.8-database {
sqlite_orig db sqlcipher-1.1.8-testkey.db
execsql {
PRAGMA key = 'testkey';
PRAGMA cipher_use_hmac = OFF;
SELECT count(*) FROM t1;
SELECT * FROM t1;
}
} {4 1 1 one one 1 2 one two}
db close
# test a rekey operation as the first op on a database
finish_test