diff options
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 928ee6355..ecdd261d2 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3045,6 +3045,12 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){ *(int*)pArg = ((unixFile*)id)->lastErrno; return SQLITE_OK; } + case SQLITE_FCNTL_SIZE_HINT: { + sqlite3_int64 szFile = *(sqlite3_int64*)pArg; + unixFile *pFile = (unixFile*)id; + ftruncate(pFile->h, szFile); + return SQLITE_OK; + } #ifndef NDEBUG /* The pager calls this method to signal that it has done ** a rollback and that the database is therefore unchanged and |