"Scott Hess" <[EMAIL PROTECTED]> wrote:
> 
> A partial fix for _this_ case is to surround the code in vdbeaux.c
> which calls virtual-table xSync to preserve db->lastRowid across the
> call.  I say partial, because I think the code really would need to be
> replicated to all virtual-table entry points (fts will also flush the
> in-memory data before running a query).  I like the notion of having
> the core take care of the problem, but it complicates all calls into
> the virtual-table layer.
> 

This is not without precedent.  The last_insert_rowid is preserved
across triggers, for example.  In other words, if an AFTER trigger
fires and does one or more inserts, the last_insert_rowid() of
the triggers inserts is visible from within the trigger, but
once the trigger returns, the last_insert_rowid reverts to the
value it had before the trigger fired.  Perhaps it is reasonable
to do the same thing for virtual tables.

--
D. Richard Hipp <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to