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

Fix a typo in walfault.test.

FossilOrigin-Name: 232dbe8ecec16485be5c5995fdf7a0ed951c2097
This commit is contained in:
dan
2010-05-04 11:06:03 +00:00
parent 8d6ad1cc2c
commit ef37802545
8 changed files with 180 additions and 174 deletions

View File

@@ -573,16 +573,20 @@ finished:
** client from unlinking the log or wal-index file. If another process
** were to do this just after this client opened one of these files, the
** system would be badly broken.
**
** If the log file is successfully opened, SQLITE_OK is returned and
** *ppWal is set to point to a new WAL handle. If an error occurs,
** an SQLite error code is returned and *ppWal is left unmodified.
*/
int sqlite3WalOpen(
sqlite3_vfs *pVfs, /* vfs module to open wal and wal-index */
const char *zDb, /* Name of database file */
Wal **ppWal /* OUT: Allocated Wal handle */
){
int rc = SQLITE_OK; /* Return Code */
int rc; /* Return Code */
Wal *pRet; /* Object to allocate and return */
int flags; /* Flags passed to OsOpen() */
char *zWal = 0; /* Path to WAL file */
char *zWal; /* Path to WAL file */
int nWal; /* Length of zWal in bytes */
assert( zDb );
@@ -609,14 +613,12 @@ int sqlite3WalOpen(
}
if( rc!=SQLITE_OK ){
if( pRet ){
pVfs->xShmClose(pVfs, pRet->pWIndex, 0);
sqlite3OsClose(pRet->pFd);
sqlite3_free(pRet);
}
pRet = 0;
pVfs->xShmClose(pVfs, pRet->pWIndex, 0);
sqlite3OsClose(pRet->pFd);
sqlite3_free(pRet);
}else{
*ppWal = pRet;
}
*ppWal = pRet;
return rc;
}