/ Check-in [4493e287]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:make diskfull test work on Windows; see check-in (1994) (CVS 1996)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4493e287809874fabeddf5ca9045065a30790f2f
User & Date: dougcurrie 2004-10-01 18:21:43
Context
2004-10-02
20:38
Fixes to the OsUnlock() interface. Correctly leave a SHARED lock behind when requested. Honor the error code that OsUnlock() returns. Ticket #913 and #938. (CVS 1997) check-in: c4697503 user: drh tags: trunk
2004-10-01
18:21
make diskfull test work on Windows; see check-in (1994) (CVS 1996) check-in: 4493e287 user: dougcurrie tags: trunk
14:38
Additional code to test the SQLITE_FULL return when the disk is full. (CVS 1994) check-in: 44e56f0b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

275
276
277
278
279
280
281

282
283
284
285
286
287
288
** or some other error code on failure.
*/
int sqlite3OsWrite(OsFile *id, const void *pBuf, int amt){
  int rc;
  DWORD wrote;
  assert( id->isOpen );
  SimulateIOError(SQLITE_IOERR);

  TRACE3("WRITE %d lock=%d\n", id->h, id->locktype);
  while( amt>0 && (rc = WriteFile(id->h, pBuf, amt, &wrote, 0))!=0 && wrote>0 ){
    amt -= wrote;
    pBuf = &((char*)pBuf)[wrote];
  }
  if( !rc || amt>(int)wrote ){
    return SQLITE_FULL;







>







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
** or some other error code on failure.
*/
int sqlite3OsWrite(OsFile *id, const void *pBuf, int amt){
  int rc;
  DWORD wrote;
  assert( id->isOpen );
  SimulateIOError(SQLITE_IOERR);
  SimulateDiskfullError;
  TRACE3("WRITE %d lock=%d\n", id->h, id->locktype);
  while( amt>0 && (rc = WriteFile(id->h, pBuf, amt, &wrote, 0))!=0 && wrote>0 ){
    amt -= wrote;
    pBuf = &((char*)pBuf)[wrote];
  }
  if( !rc || amt>(int)wrote ){
    return SQLITE_FULL;