1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Make sure the result of sqlite3VdbeGetOp() is not used as an array following

an OOM error, since after (6691) it might be a single-entry dummy opcode. (CVS 6724)

FossilOrigin-Name: 127b13981960a9690de09e8f9d0b38a4bd76015f
This commit is contained in:
drh
2009-06-06 15:17:27 +00:00
parent 41f5b04ceb
commit 125feffc89
3 changed files with 10 additions and 10 deletions

View File

@@ -16,7 +16,7 @@
** so is applicable. Because this module is responsible for selecting
** indices, you might also think of this module as the "query optimizer".
**
** $Id: where.c,v 1.400 2009/06/03 01:24:54 drh Exp $
** $Id: where.c,v 1.401 2009/06/06 15:17:28 drh Exp $
*/
#include "sqliteInt.h"
@@ -3551,7 +3551,7 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){
** that reference the table and converts them into opcodes that
** reference the index.
*/
if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 && !db->mallocFailed){
int k, j, last;
VdbeOp *pOp;
Index *pIdx = pLevel->plan.u.pIdx;