/ Check-in [3eff0ef2]
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:Correctly test DosWrite() for failure return code (CVS 5118)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3eff0ef2cfe70389bc80a270902702206be178f3
User & Date: pweilbacher 2008-05-12 00:29:42
Context
2008-05-12
00:32
Use short timeout for locking operations by default to be more in sync with the other platforms. (CVS 5119) check-in: d00a015d user: pweilbacher tags: trunk
00:29
Correctly test DosWrite() for failure return code (CVS 5118) check-in: 3eff0ef2 user: pweilbacher tags: trunk
2008-05-11
17:22
Use memcpy() instead of casting to copy the content of a long long int into a double. Ticket #3101. (CVS 5117) check-in: 88e12cac user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_os2.c.

144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
  SimulateDiskfullError( return SQLITE_FULL );
  OSTRACE3( "WRITE %d lock=%d\n", pFile->h, pFile->locktype );
  if( DosSetFilePtr(pFile->h, offset, FILE_BEGIN, &fileLocation) != NO_ERROR ){
    return SQLITE_IOERR;
  }
  assert( amt>0 );
  while( amt > 0 &&
         (rc = DosWrite( pFile->h, (PVOID)pBuf, amt, &wrote )) &&
         wrote > 0
  ){
    amt -= wrote;
    pBuf = &((char*)pBuf)[wrote];
  }

  return ( rc != NO_ERROR || amt > (int)wrote ) ? SQLITE_FULL : SQLITE_OK;







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
  SimulateDiskfullError( return SQLITE_FULL );
  OSTRACE3( "WRITE %d lock=%d\n", pFile->h, pFile->locktype );
  if( DosSetFilePtr(pFile->h, offset, FILE_BEGIN, &fileLocation) != NO_ERROR ){
    return SQLITE_IOERR;
  }
  assert( amt>0 );
  while( amt > 0 &&
         ( rc = DosWrite( pFile->h, (PVOID)pBuf, amt, &wrote ) ) != NO_ERROR &&
         wrote > 0
  ){
    amt -= wrote;
    pBuf = &((char*)pBuf)[wrote];
  }

  return ( rc != NO_ERROR || amt > (int)wrote ) ? SQLITE_FULL : SQLITE_OK;