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

Modify the code generated for a DELETE to use registers instead of the vdbe stack. (CVS 4675)

FossilOrigin-Name: 173f281334d340290e1978abea5d1ea804141910
This commit is contained in:
danielk1977
2008-01-04 13:24:28 +00:00
parent a29f18cdfc
commit 96cb76fc7a
6 changed files with 110 additions and 83 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.208 2008/01/03 23:44:53 drh Exp $
** $Id: insert.c,v 1.209 2008/01/04 13:24:29 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -1176,7 +1176,8 @@ void sqlite3GenerateConstraintChecks(
break;
}
case OE_Replace: {
sqlite3GenerateRowDelete(pParse->db, v, pTab, base, 0);
int iRowid = sqlite3StackToReg(pParse, 1);
sqlite3GenerateRowDelete(pParse->db, v, pTab, base, iRowid, 0);
if( isUpdate ){
sqlite3VdbeAddOp2(v, OP_Dup, nCol+extra+1+hasTwoRowids, 1);
sqlite3VdbeAddOp2(v, OP_MoveGe, base, 0);