Exemplo n.º 1
0
	static void OpenCounter( int X )
	{
#if !TCLSH
	  sqlite3_open_file_count += ( X );
#else
	  sqlite3_open_file_count.iValue += ( X );
#endif
	}
Exemplo n.º 2
0
	static void SimulateIOErrorBenign( int X )
	{
#if !TCLSH
	  sqlite3_io_error_benign = ( X );
#else
	  sqlite3_io_error_benign.iValue = ( X );
#endif
	}
Exemplo n.º 3
0
	//#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; }
Exemplo n.º 4
0
	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
	}