diff options
author | danielk1977 <danielk1977@noemail.net> | 2005-12-15 15:22:08 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2005-12-15 15:22:08 +0000 |
commit | 94eb6a14cb7ad11ef7c95f22eec093f77c5a71d8 (patch) | |
tree | 4c94820844ccd12a32b0fc49c64c42d300ea06a5 /src/insert.c | |
parent | c529f520468ca3bd701d009339d336c8618cf921 (diff) | |
download | sqlite-94eb6a14cb7ad11ef7c95f22eec093f77c5a71d8.tar.gz sqlite-94eb6a14cb7ad11ef7c95f22eec093f77c5a71d8.zip |
Add the sqlite3_update_hook() API. (CVS 2820)
FossilOrigin-Name: 36229018817eebfbfca7a66d2285e4faf7b39845
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/insert.c b/src/insert.c index af5854df4..bf7c594d3 100644 --- a/src/insert.c +++ b/src/insert.c @@ -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.150 2005/12/06 12:52:59 danielk1977 Exp $ +** $Id: insert.c,v 1.151 2005/12/15 15:22:09 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -1079,9 +1079,13 @@ void sqlite3CompleteInsertion( if( pParse->nested ){ pik_flags = 0; }else{ - pik_flags = (OPFLAG_NCHANGE|(isUpdate?0:OPFLAG_LASTROWID)); + pik_flags = OPFLAG_NCHANGE; + pik_flags |= (isUpdate?OPFLAG_ISUPDATE:OPFLAG_LASTROWID); } sqlite3VdbeAddOp(v, OP_Insert, base, pik_flags); + if( !pParse->nested ){ + sqlite3VdbeChangeP3(v, -1, pTab->zName, P3_STATIC); + } if( isUpdate && rowidChng ){ sqlite3VdbeAddOp(v, OP_Pop, 1, 0); |