Additional code to test the SQLITE_FULL return when the disk is full. (CVS 1994)

FossilOrigin-Name: 44e56f0bba61245d342d6e75510d6c35785efd49
This commit is contained in:
drh
2004-10-01 14:38:02 +00:00
parent ededaa59bd
commit 047d4836ff
7 changed files with 62 additions and 19 deletions
+5
View File
@@ -81,14 +81,19 @@ static unsigned int elapse;
*/
#ifdef SQLITE_TEST
int sqlite3_io_error_pending = 0;
int sqlite3_diskfull_pending = 0;
#define SimulateIOError(A) \
if( sqlite3_io_error_pending ) \
if( sqlite3_io_error_pending-- == 1 ){ local_ioerr(); return A; }
static void local_ioerr(){
sqlite3_io_error_pending = 0; /* Really just a place to set a breakpoint */
}
#define SimulateDiskfullError \
if( sqlite3_diskfull_pending ) \
if( sqlite3_diskfull_pending-- == 1 ){ local_ioerr(); return SQLITE_FULL; }
#else
#define SimulateIOError(A)
#define SimulateDiskfullError
#endif
/*