aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
diff options
context:
space:
mode:
authordrh <>2021-12-01 19:17:14 +0000
committerdrh <>2021-12-01 19:17:14 +0000
commit3b26b2b56bea391120660b01836fa03bbde089f6 (patch)
tree1881867ab0752aca306da86a3b23ccd6077c022f /src/insert.c
parent4baf43ff647ab8c6752e7fdd12efd1a979afd476 (diff)
downloadsqlite-3b26b2b56bea391120660b01836fa03bbde089f6.tar.gz
sqlite-3b26b2b56bea391120660b01836fa03bbde089f6.zip
Check for foreign key constraint errors prior to returning the results from
a RETURNING clause. See [forum:/forumpost/793beaf322|forum post 793beaf322]. FossilOrigin-Name: a818ba2ed635b91e279dde44236fc7446a33db2b46c9409b67021248c01bf4e5
Diffstat (limited to 'src/insert.c')
-rw-r--r--src/insert.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/insert.c b/src/insert.c
index 97205cb2a..96e86c9fb 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -1382,9 +1382,7 @@ insert_end:
** invoke the callback function.
*/
if( regRowCount ){
- sqlite3VdbeAddOp2(v, OP_ChngCntRow, regRowCount, 1);
- sqlite3VdbeSetNumCols(v, 1);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "rows inserted", SQLITE_STATIC);
+ sqlite3CodeChangeCount(v, regRowCount, "rows inserted");
}
insert_cleanup: