diff options
author | drh <drh@noemail.net> | 2006-09-14 13:47:11 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-09-14 13:47:11 +0000 |
commit | 5968593b5119907b844fd284dc9ec403291c6554 (patch) | |
tree | c8b8806bd28dd3f5a9391ad48239ef5c1eb029b3 /src/os_common.h | |
parent | f800e3e63a859f6c7bcc5b6ac5c8759c3f3e1c39 (diff) | |
download | sqlite-5968593b5119907b844fd284dc9ec403291c6554.tar.gz sqlite-5968593b5119907b844fd284dc9ec403291c6554.zip |
Enhanced I/O error simulation. (CVS 3418)
FossilOrigin-Name: 86931854fc5a63571719639d9a23b1d6614a6153
Diffstat (limited to 'src/os_common.h')
-rw-r--r-- | src/os_common.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/os_common.h b/src/os_common.h index d65c352dd..d5818d56f 100644 --- a/src/os_common.h +++ b/src/os_common.h @@ -92,18 +92,18 @@ int sqlite3_io_error_hit = 0; int sqlite3_io_error_pending = 0; int sqlite3_diskfull_pending = 0; int sqlite3_diskfull = 0; -#define SimulateIOError(A) \ +#define SimulateIOError(CODE) \ if( sqlite3_io_error_pending ) \ - if( sqlite3_io_error_pending-- == 1 ){ local_ioerr(); return A; } + if( sqlite3_io_error_pending-- == 1 ){ local_ioerr(); CODE; } static void local_ioerr(){ sqlite3_io_error_hit = 1; /* Really just a place to set a breakpoint */ } -#define SimulateDiskfullError \ +#define SimulateDiskfullError(CODE) \ if( sqlite3_diskfull_pending ){ \ if( sqlite3_diskfull_pending == 1 ){ \ local_ioerr(); \ sqlite3_diskfull = 1; \ - return SQLITE_FULL; \ + CODE; \ }else{ \ sqlite3_diskfull_pending--; \ } \ |