Hi, i think this will probably be "atomic".
What i mean is the transaction will aquire EXCLUSIVE lock (because of
the insert command) and it will keep this lock until commit, which
takes place after the last select and last semicolon.

So i believe no other threads should be able to do anything with your
db until the whole query finishes.

   bogdan

> hi.
> 
> i need to get last insert id in multithreaded app.
> I use C API, actually some C++ wrap over it.
> if i execute query like " insert into tbl( filed ) VALUES ( 1 ); Select
> last_insert_rowid() as li;" would be it atomic? or  it anyway would suffer
> from threads?
> 
> -- 
>   Ruslan Mullakhmetov
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to