Joanne Pham wrote: > U12232 If a separate thread does a new insert on the same database connection > while the sqlite3_last_insert_rowid() function is running and thus changes > the last insert rowid, then the value returned by sqlite3_last_insert_rowid() > is unpredictable and might not equal either the old or the new last insert > rowid. > Hi All, This limitation is still in new release 3.5.9.
Yes. The last inserted rowid is maintained on a per connection basis. If multiple threads share the same connection then they are sharing the same last inserted rowid value with no mutual exclusion provided by SQLite. You can of course use your own mutex to control access to this variable (through the API function), to allow your threads to read the value reliably after an insert. Or you could simply have each thread use a separate connection. HTH Dennis Cote _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users