The bug was closed with "cannot reproduce".  So IMHO either the bug
should be re-opened with the provided repro case, or a new bug should
be opened with the provided repro case.  Then, if the team decides
that this is works-as-designed, the team can close the bug with that
resolution.

When I brought this up on the list a year and a half ago, we didn't
really come to a conclusion on how it should work.  I think there were
arguments for both sides of the equation.  My personal preference
would be for it to work like one would expect it to (the "interior"
last-insert-id isn't exposed to "exterior" code, because it is none of
that code's business).  But it needs to happen in a way which doesn't
adversely impact performance.

-scott


On Sun, Oct 25, 2009 at 6:32 PM, Roger Binns <rog...@rogerbinns.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Wanadoo Hartwig wrote:
>>> Actually, if you replace the FTS3 table with any other type of table -
>>> or as many tables as you like and do also in these tables insert
>>> operations - the last row id of the original table is correctly
>>> returned. Therefore, I assume (I do not have any details) that there
>>> is a bug in the trigger mechanism itself.
>
> The point that keeps being missed is that FTS3 is not a regular table.  It
> is a virtual table.  That means that the SQLite core calls it corresponding
> to various SQL operations but behind the scenes it is up the virtual table
> implementation what to do.  Read about them at:
>
>  http://www.sqlite.org/cvstrac/wiki?p=VirtualTables
>
> A virtual table implementation is free to do whatever it wants.  When asked
> to insert one row, it could store 27 after converting all text to Klingon.
> It could instead delete whatever you asked it to add.  It could do nothing.
>  The FTS3 implementation happens to have 3 other tables and so on an insert
> those are updated with extra information and you are seeing those after 
> effects.
>
> Roger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkrk/A4ACgkQmOOfHg372QTEWACggOjPYsHFzB00jNMcDkOmYQ5q
> KCgAniNN8LAdKea5ZhHYO5SgrsG7qhdw
> =R9aD
> -----END PGP SIGNATURE-----
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to