diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-06-16 14:19:57 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-06-16 14:19:57 +0000 |
commit | 99e925da517c01ec3d07e83c9ec1371678e80d61 (patch) | |
tree | 0fe1b78d079279c57ac6d64587080e88fcf87b29 /src/vdbeblob.c | |
parent | fce96308b16e2230ed0ccb9e8ee085770177a370 (diff) | |
download | sqlite-99e925da517c01ec3d07e83c9ec1371678e80d61.tar.gz sqlite-99e925da517c01ec3d07e83c9ec1371678e80d61.zip |
Fix a problem with the incremental blob API. sqlite3_blob_open() was always reading the data for the leftmost column of the row that the opened blob was stored in. If this column happened to contain a (the) large blob, sqlite would make a large memory allocation to read the data into. Which defeats the purpose of using incremental blobs. (CVS 5222)
FossilOrigin-Name: 1b9478da2f421c1270e76297324fff8037d2f231
Diffstat (limited to 'src/vdbeblob.c')
-rw-r--r-- | src/vdbeblob.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vdbeblob.c b/src/vdbeblob.c index 6b5a19dd7..c0df14e06 100644 --- a/src/vdbeblob.c +++ b/src/vdbeblob.c @@ -12,7 +12,7 @@ ** ** This file contains code used to implement incremental BLOB I/O. ** -** $Id: vdbeblob.c,v 1.22 2008/04/24 09:49:55 danielk1977 Exp $ +** $Id: vdbeblob.c,v 1.23 2008/06/16 14:19:58 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -191,6 +191,7 @@ int sqlite3_blob_open( ** and offset cache without causing any IO. */ sqlite3VdbeChangeP2(v, flags ? 4 : 2, pTab->nCol+1); + sqlite3VdbeChangeP2(v, 8, pTab->nCol); if( !db->mallocFailed ){ sqlite3VdbeMakeReady(v, 1, 1, 1, 0); } |