@@ -42,6 +42,7 @@ file delete -force test4.db
4242
4343set testdir [file dirname $argv0]
4444source $testdir/tester.tcl
45+ set old_pending_byte [sqlite3_test_control_pending_byte 0x40000000]
4546
4647# If the library is not compiled with has_codec support then
4748# skip all tests in this file.
@@ -932,17 +933,18 @@ file delete -force test.db
932933
933934# open a 1.1.8 database using the new code, HMAC disabled
934935do_test open-1.1.8-database {
935- sqlite_orig db sqlcipher-1.1.8-testkey.db
936+ file copy -force sqlcipher-1.1.8-testkey.db test.db
937+ sqlite_orig db test.db
936938 execsql {
937939 PRAGMA key = 'testkey';
938- PRAGMA cipher_use_hmac = OFF ;
940+ PRAGMA cipher_use_hmac = off ;
939941 PRAGMA kdf_iter = 4000;
940942 SELECT count(*) FROM t1;
941- SELECT * FROM t1;
943+ SELECT distinct * FROM t1;
942944 }
943- } {4 1 1 one one 1 2 one two}
945+ } {75709 1 1 one one 1 2 one two 1 2 }
944946db close
945-
947+ file delete -force test.db
946948
947949# open a 1.1.8 database without hmac, then copy the data
948950do_test attach-and-copy-1.1.8 {
@@ -963,9 +965,9 @@ do_test attach-and-copy-1.1.8 {
963965 execsql {
964966 PRAGMA key = 'testkey-hmac';
965967 SELECT count(*) FROM t1;
966- SELECT * FROM t1;
968+ SELECT distinct * FROM t1;
967969 }
968- } {4 1 1 one one 1 2 one two}
970+ } {75709 1 1 one one 1 2 one two 1 2 }
969971db close
970972file delete -force test.db
971973
@@ -1426,7 +1428,7 @@ do_test default-hmac-kdf-attach {
14261428 PRAGMA cipher_default_use_hmac = ON;
14271429 PRAGMA cipher_default_kdf_iter = 64000;
14281430 }
1429- } {4 4 }
1431+ } {75709 75709 }
14301432db close
14311433file delete -force test.db
14321434
@@ -1469,7 +1471,7 @@ do_test change-default-hmac-kdf-attach {
14691471 PRAGMA cipher_default_use_hmac = ON;
14701472 PRAGMA cipher_default_kdf_iter = 64000;
14711473 }
1472- } {1 4 }
1474+ } {1 75709 }
14731475db close
14741476file delete -force test.db
14751477
@@ -2112,4 +2114,5 @@ db close
21122114file delete -force test.db
21132115file delete -force new.db
21142116
2117+ sqlite3_test_control_pending_byte $old_pending_byte
21152118finish_test
0 commit comments