mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix minor problems with new code in memjournal.c.
FossilOrigin-Name: 9fd3f7b9c93325a83cdbe7dc9ee312b22a9c2898
This commit is contained in:
@@ -1343,6 +1343,7 @@ static i64 journalHdrOffset(Pager *pPager){
|
||||
static int zeroJournalHdr(Pager *pPager, int doTruncate){
|
||||
int rc = SQLITE_OK; /* Return code */
|
||||
assert( isOpen(pPager->jfd) );
|
||||
assert( !sqlite3JournalIsInMemory(pPager->jfd) );
|
||||
if( pPager->journalOff ){
|
||||
const i64 iLimit = pPager->journalSizeLimit; /* Local cache of jsl */
|
||||
|
||||
@@ -1989,9 +1990,10 @@ static int pager_end_transaction(Pager *pPager, int hasMaster, int bCommit){
|
||||
/* This branch may be executed with Pager.journalMode==MEMORY if
|
||||
** a hot-journal was just rolled back. In this case the journal
|
||||
** file should be closed and deleted. If this connection writes to
|
||||
** the database file, it will do so using an in-memory journal.
|
||||
** the database file, it will do so using an in-memory journal.
|
||||
*/
|
||||
int bDelete = (!pPager->tempFile&&!sqlite3JournalIsInMemory(pPager->jfd));
|
||||
int bDelete = !pPager->tempFile;
|
||||
assert( sqlite3JournalIsInMemory(pPager->jfd)==0 );
|
||||
assert( pPager->journalMode==PAGER_JOURNALMODE_DELETE
|
||||
|| pPager->journalMode==PAGER_JOURNALMODE_MEMORY
|
||||
|| pPager->journalMode==PAGER_JOURNALMODE_WAL
|
||||
@@ -2729,7 +2731,7 @@ static int pager_playback(Pager *pPager, int isHot){
|
||||
** TODO: Technically the following is an error because it assumes that
|
||||
** buffer Pager.pTmpSpace is (mxPathname+1) bytes or larger. i.e. that
|
||||
** (pPager->pageSize >= pPager->pVfs->mxPathname+1). Using os_unix.c,
|
||||
** mxPathname is 512, which is the same as the minimum allowable value
|
||||
** mxPathname is 512, which is the same as the minimum allowable value
|
||||
** for pageSize.
|
||||
*/
|
||||
zMaster = pPager->pTmpSpace;
|
||||
|
Reference in New Issue
Block a user