Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Change an assert in pager.c to acknowledge that it is possible for sqlite3PagerRollback() to return SQLITE_CORRUPT. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | experimental-mmap |
Files: | files | file ages | folders |
SHA1: |
d641d3d20d80fdb86d91de31fcf2eb5c |
User & Date: | dan 2013-04-02 18:31:29.703 |
Context
2013-04-02
| ||
18:33 | Add test cases to mmap1.test and pagerfault.test. (check-in: 3050136be9 user: dan tags: experimental-mmap) | |
18:31 | Change an assert in pager.c to acknowledge that it is possible for sqlite3PagerRollback() to return SQLITE_CORRUPT. (check-in: d641d3d20d user: dan tags: experimental-mmap) | |
18:25 | Fix the build for Mac. (check-in: d36ce0bbad user: drh tags: experimental-mmap) | |
Changes
Changes to src/pager.c.
︙ | ︙ | |||
6257 6258 6259 6260 6261 6262 6263 | return rc; } }else{ rc = pager_playback(pPager, 0); } assert( pPager->eState==PAGER_READER || rc!=SQLITE_OK ); | | | 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 | return rc; } }else{ rc = pager_playback(pPager, 0); } assert( pPager->eState==PAGER_READER || rc!=SQLITE_OK ); assert( rc==SQLITE_OK || rc==SQLITE_FULL || rc==SQLITE_CORRUPT || rc==SQLITE_NOMEM || (rc&0xFF)==SQLITE_IOERR ); /* If an error occurs during a ROLLBACK, we can no longer trust the pager ** cache. So call pager_error() on the way out to make any error persistent. */ return pager_error(pPager, rc); } |
︙ | ︙ |
Changes to test/wal.test.
︙ | ︙ | |||
1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 | # WAL file now contains a single frame - the new root page for table t1. # It would be two frames (the new root page and a padding frame) if the # ZERO_DAMAGE flag were not set. do_test 24.5 { file size test.db-wal } [wal_file_size 1 1024] } db close sqlite3_shutdown test_sqlite3_log sqlite3_initialize finish_test | > > > > > > > > > > > > > > > > > > > > | 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 | # WAL file now contains a single frame - the new root page for table t1. # It would be two frames (the new root page and a padding frame) if the # ZERO_DAMAGE flag were not set. do_test 24.5 { file size test.db-wal } [wal_file_size 1 1024] } reset_db do_test 25 { sqlite3 db test.db execsql { CREATE TABLE t1(x, y); PRAGMA journal_mode = WAL; INSERT INTO t1 VALUES(1, 2); } execsql { BEGIN; CREATE TABLE t2(a, b); } hexio_write test.db-shm [expr 16*1024] [string repeat 0055 8192] catchsql ROLLBACK } {0 {}} db close sqlite3_shutdown test_sqlite3_log sqlite3_initialize finish_test |