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

Add the SQLITE_ENABLE_PREUPDATE_HOOK compile-time option.

FossilOrigin-Name: 6634521461e6acff7cc778590e62d57831f9230d
This commit is contained in:
drh
2011-03-30 21:04:43 +00:00
parent 67c495ac20
commit 9b1c62d416
20 changed files with 95 additions and 39 deletions

View File

@@ -487,13 +487,13 @@ void sqlite3Update(
/* Delete the index entries associated with the current record. */
j1 = sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, regOldRowid);
sqlite3GenerateRowIndexDelete(pParse, pTab, iCur, aRegIdx);
/* If changing the rowid value, or if there are foreign key constraints
** to process, delete the old record. Otherwise, add a noop OP_Delete
** to invoke the pre-update hook.
**
** That (regNew==regnewRowid+1) is true is also important for the
** pre-update hook. If hte caller invokes preupdate_new(), the returned
** pre-update hook. If the caller invokes preupdate_new(), the returned
** value is copied from memory cell (regNewRowid+1+iCol), where iCol
** is the column index supplied by the user.
*/