mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Allow the xAccess method in the VFS to return -1 to signal an I/O
error, and in particular an SQLITE_IOERR_NOMEM. (CVS 4925) FossilOrigin-Name: 3cb704c4c439425781644b1b653b7e50f02fd91e
This commit is contained in:
@@ -1290,13 +1290,17 @@ static int vdbeCommit(sqlite3 *db){
|
||||
if( !zMaster ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
}while( sqlite3OsAccess(pVfs, zMaster, SQLITE_ACCESS_EXISTS) );
|
||||
|
||||
/* Open the master journal. */
|
||||
rc = sqlite3OsOpenMalloc(pVfs, zMaster, &pMaster,
|
||||
SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|
|
||||
SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_MASTER_JOURNAL, 0
|
||||
);
|
||||
rc = sqlite3OsAccess(pVfs, zMaster, SQLITE_ACCESS_EXISTS);
|
||||
}while( rc==1 );
|
||||
if( rc!=0 ){
|
||||
rc = SQLITE_IOERR_NOMEM;
|
||||
}else{
|
||||
/* Open the master journal. */
|
||||
rc = sqlite3OsOpenMalloc(pVfs, zMaster, &pMaster,
|
||||
SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|
|
||||
SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_MASTER_JOURNAL, 0
|
||||
);
|
||||
}
|
||||
if( rc!=SQLITE_OK ){
|
||||
sqlite3_free(zMaster);
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user