1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Bug fix in appendvfs.c: Adjust the size parameter for

SQLITE_FCNTL_SIZE_HINT to account for the prefix.

FossilOrigin-Name: 41df3bbefd63151f2ddb920066777eab8e07ecfc0edb0f71f9493debe0a4a2c4
This commit is contained in:
drh
2021-03-11 13:43:29 +00:00
parent 632f0ed265
commit 407cfe994d
3 changed files with 9 additions and 8 deletions

View File

@ -347,6 +347,7 @@ static int apndFileControl(sqlite3_file *pFile, int op, void *pArg){
ApndFile *paf = (ApndFile *)pFile;
int rc;
pFile = ORIGFILE(pFile);
if( op==SQLITE_FCNTL_SIZE_HINT ) *(sqlite3_int64*)pArg += paf->iPgOne;
rc = pFile->pMethods->xFileControl(pFile, op, pArg);
if( rc==SQLITE_OK && op==SQLITE_FCNTL_VFSNAME ){
*(char**)pArg = sqlite3_mprintf("apnd(%lld)/%z", paf->iPgOne,*(char**)pArg);