On Jan 9, 2008 11:55 AM, <[EMAIL PROTECTED]> wrote: > "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.
OK, I'll look into this, once I come up for air. Since nobody has complained, I'm guessing that it's not been a problem for anyone :-). Probably most people are fetching the last-insert-rowid immediately after the insert, rather than sometime later. -scott ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------