Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Avoid calling xRead() on a part of the database file that is memory mapped. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | experimental-mmap |
Files: | files | file ages | folders |
SHA1: |
c8eac290a7240d69494bd0dad5ed1fdc |
User & Date: | dan 2013-03-21 20:00:07.703 |
Context
2013-03-21
| ||
20:39 | Fix cases where xRead() was being used to read from a memory mapped part of the database file. (check-in: 5c9e9df27b user: dan tags: experimental-mmap) | |
20:00 | Avoid calling xRead() on a part of the database file that is memory mapped. (check-in: c8eac290a7 user: dan tags: experimental-mmap) | |
15:57 | Fix a problem when opening a write-transaction while there exist read-only b-tree cursors in mmap mode. (check-in: 32e0bbb736 user: dan tags: experimental-mmap) | |
Changes
Changes to src/pager.c.
︙ | ︙ | |||
5126 5127 5128 5129 5130 5131 5132 | */ Pgno nPage = 0; char dbFileVers[sizeof(pPager->dbFileVers)]; rc = pagerPagecount(pPager, &nPage); if( rc ) goto failed; | | > > > | > | 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 | */ Pgno nPage = 0; char dbFileVers[sizeof(pPager->dbFileVers)]; rc = pagerPagecount(pPager, &nPage); if( rc ) goto failed; if( nPage>0 || pPager->pMap ){ IOTRACE(("CKVERS %p %d\n", pPager, sizeof(dbFileVers))); if( pPager->pMap ){ memcpy(&dbFileVers, &((u8 *)(pPager->pMap))[24], sizeof(dbFileVers)); }else{ rc = sqlite3OsRead(pPager->fd, &dbFileVers, sizeof(dbFileVers), 24); } if( rc!=SQLITE_OK ){ goto failed; } }else{ memset(dbFileVers, 0, sizeof(dbFileVers)); } |
︙ | ︙ |