diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-09-22 11:46:32 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-09-22 11:46:32 +0000 |
commit | cd3b3c8902a7c4590899b3fcb53e9ed67cec0386 (patch) | |
tree | a9f2f877b2faa3aee05c0d15414dfc3ea07f9b99 /src/os_unix.c | |
parent | a815fd64a7fb33baa8f6bbb2357bf61c0c768fe6 (diff) | |
download | sqlite-cd3b3c8902a7c4590899b3fcb53e9ed67cec0386.tar.gz sqlite-cd3b3c8902a7c4590899b3fcb53e9ed67cec0386.zip |
Add instrumentation to os_unix.c to test that a return value of SQLITE_FULL from an xSync() callback is handled correctly. (CVS 5730)
FossilOrigin-Name: 7bd2da93c6cce52edbbe53fe26a82ad159dd6b6b
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index d84b90419..ea38ec5cf 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -12,7 +12,7 @@ ** ** This file contains code that is specific to Unix systems. ** -** $Id: os_unix.c,v 1.201 2008/09/15 04:20:32 danielk1977 Exp $ +** $Id: os_unix.c,v 1.202 2008/09/22 11:46:33 danielk1977 Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_UNIX /* This file is used on unix only */ @@ -1062,6 +1062,11 @@ static int unixSync(sqlite3_file *id, int flags){ || (flags&0x0F)==SQLITE_SYNC_FULL ); + /* Unix cannot, but some systems may return SQLITE_FULL from here. This + ** line is to test that doing so does not cause any problems. + */ + SimulateDiskfullError( return SQLITE_FULL ); + assert( pFile ); OSTRACE2("SYNC %-3d\n", pFile->h); rc = full_fsync(pFile->h, isFullsync, isDataOnly); |