1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

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
This commit is contained in:
danielk1977
2008-09-22 11:46:32 +00:00
parent a815fd64a7
commit cd3b3c8902
3 changed files with 14 additions and 9 deletions

View File

@@ -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);