1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Ensure that sqlite3_blob_reopen() correctly handles short rows.

Proposed fix for ticket [e6e962d6b0f06f46e].  Further testing needed.

FossilOrigin-Name: 57d8dad35c2a9ab635e954dce7f3986ae1ca8ed2
This commit is contained in:
drh
2017-01-25 04:41:34 +00:00
parent d1b2566b07
commit 210b0d0eb3
3 changed files with 13 additions and 8 deletions

View File

@@ -77,7 +77,9 @@ static int blobSeekToRow(Incrblob *p, sqlite3_int64 iRow, char **pzErr){
}
if( rc==SQLITE_ROW ){
VdbeCursor *pC = v->apCsr[0];
u32 type = pC->aType[p->iCol];
u32 type = pC->nHdrParsed>p->iCol ? pC->aType[p->iCol] : 0;
testcase( pC->nHdrParsed==p->iCol );
testcase( pC->nHdrParsed==p->iCol+1 );
if( type<12 ){
zErr = sqlite3MPrintf(p->db, "cannot open value of type %s",
type==0?"null": type==7?"real": "integer"