mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Proposed fix for the use of posix_fallocate() so that it handles EINVAL
returns correctly. FossilOrigin-Name: ab3a5539db82814cafb832cdaebd1e14566139306453ef9cdba6b244a994fe0b
This commit is contained in:
@@ -3779,7 +3779,7 @@ static int fcntlSizeHint(unixFile *pFile, i64 nByte){
|
||||
do{
|
||||
err = osFallocate(pFile->h, buf.st_size, nSize-buf.st_size);
|
||||
}while( err==EINTR );
|
||||
if( err ) return SQLITE_IOERR_WRITE;
|
||||
if( err && err!=EINVAL ) return SQLITE_IOERR_WRITE;
|
||||
#else
|
||||
/* If the OS does not have posix_fallocate(), fake it. Write a
|
||||
** single byte to the last byte in each block that falls entirely
|
||||
|
||||
Reference in New Issue
Block a user