On Tue, Nov 16, 2010 at 09:35:21AM -0500, Pavel Ivanov scratched on the wall:

> But as I see in SQLite sources sqlite3_exec does acquire
> connection's mutex, so nothing can be executed in between statements.
> Thus if you execute this line as one call to sqlite3_exec then it
> won't suffer from threading.

  Humm... I missed that.  I knew that _exec() doesn't actually open a
  proper transaction (since it has no idea what the transaction state
  might be), but I didn't catch that it still grabs the mutex to
  prevent issues with threads.
  
  Clever.



  More teo the point, that means a single _exec() call with the INSERT,
  followed by a call to last_insert_rowid() should always do the right
  thing.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to