mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Cleanup and simplification of constraint processing. Simplifications
to the VM for better test coverage. (CVS 4729) FossilOrigin-Name: d9ebe9d78c558af050c44ac4437ce0ef8193a4a8
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle UPDATE statements.
|
||||
**
|
||||
** $Id: update.c,v 1.169 2008/01/17 16:22:15 drh Exp $
|
||||
** $Id: update.c,v 1.170 2008/01/19 03:35:59 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -102,6 +102,7 @@ void sqlite3Update(
|
||||
AuthContext sContext; /* The authorization context */
|
||||
NameContext sNC; /* The name-context to resolve expressions in */
|
||||
int iDb; /* Database containing the table being updated */
|
||||
int j1; /* Addresses of jump instructions */
|
||||
|
||||
#ifndef SQLITE_OMIT_TRIGGER
|
||||
int isView; /* Trying to update a view */
|
||||
@@ -504,6 +505,7 @@ void sqlite3Update(
|
||||
|
||||
/* Delete the old indices for the current record.
|
||||
*/
|
||||
j1 = sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, regOldRowid);
|
||||
sqlite3GenerateRowIndexDelete(pParse, pTab, iCur, aRegIdx);
|
||||
|
||||
/* If changing the record number, delete the old record.
|
||||
@@ -511,6 +513,7 @@ void sqlite3Update(
|
||||
if( chngRowid ){
|
||||
sqlite3VdbeAddOp2(v, OP_Delete, iCur, 0);
|
||||
}
|
||||
sqlite3VdbeJumpHere(v, j1);
|
||||
|
||||
/* Create the new index entries and the new record.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user