1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Remove entries from wal-index hash tables when a rollback or savepoint rollback occurs.

FossilOrigin-Name: 36795c2b23a78978528cace193e386138adacd41
This commit is contained in:
dan
2010-05-21 15:31:56 +00:00
parent f0b20f8801
commit 6f1501481f
4 changed files with 84 additions and 26 deletions

View File

@ -600,7 +600,32 @@ do_test wal2-6.5.2 {
do_test wal2-6.5.3 {
execsql { PRAGMA wal_checkpoint }
} {}
db close
#-------------------------------------------------------------------------
# Test a theory about the checksum algorithm. Theory was false and this
# test did not provoke a bug.
file delete -force test.db test.db-wal test.db-journal
do_test wal2-7.1.1 {
sqlite3 db test.db
execsql {
PRAGMA page_size = 4096;
PRAGMA journal_mode = WAL;
CREATE TABLE t1(a, b);
}
file size test.db
} {4096}
do_test wal2-7.1.2 {
file copy -force test.db test2.db
file copy -force test.db-wal test2.db-wal
hexio_write test2.db-wal 48 FF
} {1}
do_test wal2-7.1.3 {
sqlite3 db2 test2.db
execsql { PRAGMA wal_checkpoint } db2
execsql { SELECT * FROM sqlite_master } db2
} {}
db2 close
finish_test