1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Remove asserts on the existing of journal files in pager - asserts that

are not valid for certain kinds of simulated I/O errors or for async I/O. (CVS 3769)

FossilOrigin-Name: f5fad52a97a16faddc2701ea0e05a301974eda1a
This commit is contained in:
drh
2007-03-30 17:18:50 +00:00
parent a817e42a21
commit 1abd422d99
3 changed files with 13 additions and 10 deletions

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.309 2007/03/30 16:01:55 drh Exp $
** @(#) $Id: pager.c,v 1.310 2007/03/30 17:18:51 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -956,9 +956,12 @@ static int pager_end_transaction(Pager *pPager){
** be in the file system. This pager still holds a RESERVED or greater
** lock on the database file, so there is no chance another process
** could create or remove a journal file.
**
** These asserts are not valid for asynchronous I/O such as is found
** in async.test
*/
assert( sqlite3OsFileExists(pPager->zJournal) || pPager->tempFile );
assert( !sqlite3OsFileExists(pPager->zJournal) || !pPager->tempFile );
/*assert( sqlite3OsFileExists(pPager->zJournal) || pPager->tempFile );*/
/*assert( !sqlite3OsFileExists(pPager->zJournal) || !pPager->tempFile );*/
if( !pPager->tempFile ){
rc = sqlite3OsDelete(pPager->zJournal);
}