mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
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
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
** is not included in the SQLite library. It is used for automated
|
||||
** testing of the SQLite library.
|
||||
**
|
||||
** $Id: test8.c,v 1.64 2008/05/13 13:27:34 drh Exp $
|
||||
** $Id: test8.c,v 1.65 2008/06/16 14:19:58 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
@@ -781,7 +781,7 @@ static int echoBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
|
||||
if( !isIgnoreUsable && !pConstraint->usable ) continue;
|
||||
|
||||
iCol = pConstraint->iColumn;
|
||||
if( pVtab->aIndex[iCol] ){
|
||||
if( pVtab->aIndex[iCol] || iCol<0 ){
|
||||
char *zCol = pVtab->aCol[iCol];
|
||||
char *zOp = 0;
|
||||
useIdx = 1;
|
||||
|
Reference in New Issue
Block a user