/ Check-in [721e3c16]
Login

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

Overview
Comment:Make sure the unix backend returns SQLITE_FULL if write() fails with an ENOSPC error code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 721e3c16b389a43f5d7c47a8fd0294473a39dad2
User & Date: drh 2011-04-15 12:36:10
Context
2011-04-15
14:33
Fix #ifs involving SQLITE_ENABLE_LOCKING_STYLE so that they check the value of that macro and not whether it is defined. check-in: 8775f159 user: drh tags: trunk
13:29
Add retry logic to GetFileAttributesEx() on windows. Closed-Leaf check-in: 1cca9a49 user: drh tags: experimental
12:36
Make sure the unix backend returns SQLITE_FULL if write() fails with an ENOSPC error code. check-in: 721e3c16 user: drh tags: trunk
2011-04-13
23:42
Remove extra CR and NL characters from FormatMessage() generated error messages in the windows VFS. check-in: 8332949c user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
    offset += wrote;
    pBuf = &((char*)pBuf)[wrote];
  }
  SimulateIOError(( wrote=(-1), amt=1 ));
  SimulateDiskfullError(( wrote=0, amt=1 ));

  if( amt>0 ){
    if( wrote<0 ){
      /* lastErrno set by seekAndWrite */
      return SQLITE_IOERR_WRITE;
    }else{
      pFile->lastErrno = 0; /* not a system error */
      return SQLITE_FULL;
    }
  }







|







3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
    offset += wrote;
    pBuf = &((char*)pBuf)[wrote];
  }
  SimulateIOError(( wrote=(-1), amt=1 ));
  SimulateDiskfullError(( wrote=0, amt=1 ));

  if( amt>0 ){
    if( wrote<0 && pFile->lastErrno!=ENOSPC ){
      /* lastErrno set by seekAndWrite */
      return SQLITE_IOERR_WRITE;
    }else{
      pFile->lastErrno = 0; /* not a system error */
      return SQLITE_FULL;
    }
  }