diff options
author | dan <dan@noemail.net> | 2010-04-12 19:00:29 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2010-04-12 19:00:29 +0000 |
commit | 7c24610e640edd2d547c11fa87a185ffeef7e94f (patch) | |
tree | da5a0bb59036280b4866c2e6628adf810b7a968d /src/os_unix.c | |
parent | eada58aa49ed28f9e037d7f05f35279e938968a4 (diff) | |
download | sqlite-7c24610e640edd2d547c11fa87a185ffeef7e94f.tar.gz sqlite-7c24610e640edd2d547c11fa87a185ffeef7e94f.zip |
Import experimental write-ahead-logging code.
FossilOrigin-Name: 409d61baeb0a19d1700c973f16c8acef7b8506cd
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 769e75df3..80ce9e0b0 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1536,9 +1536,11 @@ static int _posixUnlock(sqlite3_file *id, int locktype, int handleNFSUnlock){ ** the file has changed and hence might not know to flush their ** cache. The use of a stale cache can lead to database corruption. */ +#if 0 assert( pFile->inNormalWrite==0 || pFile->dbUpdate==0 || pFile->transCntrChng==1 ); +#endif pFile->inNormalWrite = 0; #endif @@ -2956,10 +2958,12 @@ static int unixRead( /* If this is a database file (not a journal, master-journal or temp ** file), the bytes in the locking range should never be read or written. */ +#if 0 assert( pFile->pUnused==0 || offset>=PENDING_BYTE+512 || offset+amt<=PENDING_BYTE ); +#endif got = seekAndRead(pFile, offset, pBuf, amt); if( got==amt ){ @@ -3031,10 +3035,12 @@ static int unixWrite( /* If this is a database file (not a journal, master-journal or temp ** file), the bytes in the locking range should never be read or written. */ +#if 0 assert( pFile->pUnused==0 || offset>=PENDING_BYTE+512 || offset+amt<=PENDING_BYTE ); +#endif #ifndef NDEBUG /* If we are doing a normal write to a database file (as opposed to |