"Emerson Clarke" <[EMAIL PROTECTED]> wrote: > > The first question is why database locking has been enabled on a per thread > basis instead of per process so that the normal methods of thread > synchronisation (mutexes, ciritcal sections) could not be used for > maintaining consistency within the application.
Most SQLite users have multiple processes accessing the database at the same time. Hence, thread synchronization will not work in the common case. But you can redefine the locking logic of SQLite at run-time to do whatever you want. You have to compile with -DSQLITE_ENABLE_REDEF_IO=1. Once you have done that, there is a global variable named "sqlite3Os" of type "struct sqlite3OsVtbl" that contains a bunch of pointers to routines that handle the operating-specific I/O for SQLite. You can substitute alternative routines that do thread synchronization. > > And the second question is simply how hard is it to support the multiple > insert syntax discussed above, or is it simply a case of there being nothing > to be gained.... The multiple insert syntax provides no performance gain over the use of prepared statements. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

