diff options
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/insert.c b/src/insert.c index 2fbfcce4a..dc63fe60f 100644 --- a/src/insert.c +++ b/src/insert.c @@ -1268,6 +1268,11 @@ void sqlite3Insert( regIns, aRegIdx, 0, appendFlag, bUseSeek ); } + }else if( pParse->bReturning ){ + /* If there is a RETURNING clause, populate the rowid register with + ** constant value -1, in case one or more of the returned expressions + ** refer to the "rowid" of the view. */ + sqlite3VdbeAddOp2(v, OP_Integer, -1, regRowid); } /* Update the count of rows that are inserted |