Since the file access has already worked by this stage the "plethora" is far smaller than you may have appreciated. It is a reasonable assumption to make that the only thing which can have changed since the last write is the disk becoming full. A disk cable falling off, head crash or mechanical disk failure is not only unlikely but would crash the entire machine and make error detection and recovery unlikely so testing for it is futile.
JS

Drew, Stephen wrote:
Hello,
In sqlite3OsWrite function (in os_win.c) the following code exists: 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;

  }

Is this really a valid occasion to return SQLITE_FULL?   Surely
WriteFile Win32 API call can fail to write a full for a plethora of
reasons, or am I missing something?

Many thanks in advance

Regards,

Steve



Reply via email to