1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Avoid using the "direct overflow read" optimization to read large blobs if the

pager layer has a wal file open - even if the database header indicates that
the db is not a wal database.

FossilOrigin-Name: b54c15f11796a75683eec4b502a22ccb87d621c6
This commit is contained in:
dan
2016-10-21 10:49:39 +00:00
parent ceb97c1107
commit e24452edef
6 changed files with 75 additions and 11 deletions

View File

@@ -4608,7 +4608,7 @@ static int accessPayload(
&& (bEnd || a==ovflSize) /* (6) */
&& pBt->inTransaction==TRANS_READ /* (4) */
&& (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (3) */
&& pBt->pPage1->aData[19]==0x01 /* (5) */
&& 0==sqlite3PagerUseWal(pBt->pPager) /* (5) */
&& &pBuf[-4]>=pBufStart /* (7) */
){
u8 aSave[4];