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

Try to find some more stack leaks by adding OP_StackDepth to loops in DML statements. None were found. (CVS 4617)

FossilOrigin-Name: 12c3029b1edcff4435177c709fb2584323f8c515
This commit is contained in:
danielk1977
2007-12-12 17:42:53 +00:00
parent 6811e399ff
commit 997a904016
5 changed files with 17 additions and 12 deletions

View File

@@ -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.194 2007/11/27 14:46:42 drh Exp $
** $Id: insert.c,v 1.195 2007/12/12 17:42:53 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -509,6 +509,7 @@ void sqlite3Insert(
*/
srcTab = pParse->nTab++;
sqlite3VdbeResolveLabel(v, iInsertBlock);
sqlite3VdbeAddOp(v, OP_StackDepth, -1, 0);
sqlite3VdbeAddOp(v, OP_MakeRecord, nColumn, 0);
sqlite3VdbeAddOp(v, OP_NewRowid, srcTab, 0);
sqlite3VdbeAddOp(v, OP_Pull, 1, 0);
@@ -641,6 +642,7 @@ void sqlite3Insert(
}else if( pSelect ){
sqlite3VdbeAddOp(v, OP_Goto, 0, iSelectLoop);
sqlite3VdbeResolveLabel(v, iInsertBlock);
sqlite3VdbeAddOp(v, OP_StackDepth, -1, 0);
}
/* Run the BEFORE and INSTEAD OF triggers, if there are any