mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Enhance the sqlite3VdbeGetOp() routine so that it always returns a pointer
to VdbeOp, even following an OOM fault. This simplifies error handling in callers. Cleanup to the column cache logic and the expr.c source module. (CVS 6691) FossilOrigin-Name: ede06dacdf7acab23cd9666a0a0d092a637bcb78
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle INSERT statements in SQLite.
|
||||
**
|
||||
** $Id: insert.c,v 1.267 2009/05/04 11:42:30 danielk1977 Exp $
|
||||
** $Id: insert.c,v 1.268 2009/05/29 19:00:13 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -862,7 +862,7 @@ void sqlite3Insert(
|
||||
}else{
|
||||
VdbeOp *pOp;
|
||||
sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr, regRowid);
|
||||
pOp = sqlite3VdbeGetOp(v, sqlite3VdbeCurrentAddr(v) - 1);
|
||||
pOp = sqlite3VdbeGetOp(v, -1);
|
||||
if( ALWAYS(pOp) && pOp->opcode==OP_Null && !IsVirtual(pTab) ){
|
||||
appendFlag = 1;
|
||||
pOp->opcode = OP_NewRowid;
|
||||
|
||||
Reference in New Issue
Block a user