mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
If an SQL function makes a recursive call to do an INSERT into the same
database, make sure that the last_insert_rowid() for that INSERT is recorded. FossilOrigin-Name: e93aecc090c2a1d3c231bb2bde044886eff0bdf7
This commit is contained in:
@@ -1559,6 +1559,7 @@ case OP_Function: {
|
||||
MemSetTypeFlag(ctx.pOut, MEM_Null);
|
||||
ctx.fErrorOrAux = 0;
|
||||
(*ctx.pFunc->xFunc)(&ctx, n, apVal); /* IMP: R-24505-23230 */
|
||||
lastRowid = db->lastRowid; /* Remember rowid changes made by xFunc */
|
||||
|
||||
/* If the function returned an error, throw an exception */
|
||||
if( ctx.fErrorOrAux ){
|
||||
|
Reference in New Issue
Block a user