static void OpenCounter( int X ) { #if !TCLSH sqlite3_open_file_count += ( X ); #else sqlite3_open_file_count.iValue += ( X ); #endif }
static void SimulateIOErrorBenign( int X ) { #if !TCLSH sqlite3_io_error_benign = ( X ); #else sqlite3_io_error_benign.iValue = ( X ); #endif }
//#define SimulateDiskfullError(CODE) \ // if( sqlite3_diskfull_pending ){ \ // if( sqlite3_diskfull_pending == 1 ){ \ // local_ioerr(); \ // sqlite3_diskfull = 1; \ // sqlite3_io_error_hit = 1; \ // CODE; \ // }else{ \ // sqlite3_diskfull_pending--; \ // } \ // } static bool SimulateDiskfullError() { #if !TCLSH if ( sqlite3_diskfull_pending != 0 ) { if ( sqlite3_diskfull_pending == 1 ) { #else if ( sqlite3_diskfull_pending.iValue != 0 ) { if ( sqlite3_diskfull_pending.iValue == 1 ) { #endif local_ioerr(); #if !TCLSH sqlite3_diskfull = 1; sqlite3_io_error_hit = 1; #else sqlite3_diskfull.iValue = 1; sqlite3_io_error_hit.iValue = 1; #endif return true; } else { #if !TCLSH sqlite3_diskfull_pending--; #else sqlite3_diskfull_pending.iValue--; #endif } } return false; } #else static bool SimulateIOError() { return false; }
static void updateMaxBlobsize( Mem p ) { #if !TCLSH if ( ( p.flags & ( MEM_Str | MEM_Blob ) ) != 0 && p.n > sqlite3_max_blobsize ) { sqlite3_max_blobsize = p.n; } #else if ( ( p.flags & ( MEM_Str | MEM_Blob ) ) != 0 && p.n > sqlite3_max_blobsize.iValue ) { sqlite3_max_blobsize.iValue = p.n; } #endif }