"Jay Sprenkle" <[EMAIL PROTECTED]> wrote: > Good morning all, > > I'm in the design stage of a project and had a question about sqlite > shared-cache mode. > The new version of firefox will use mozStorage, which is based on > sqlite using shared-cache mode. I want other programs to be able > read/write to the database but I was told this might > be a problem. Are there any issues with two completely separate > processes accessing > the database when in this mode? This will be important if other apps > want to read or > manipulate the downloaded files list or the bookmarks. >
The shared-cache mode of SQLite does nothing to prevent other programs from reading and writing a database at the same time. (Well - not exactly the same time - but interleaving their reads and writes dynamically just like regular SQLite - you know what I mean....) However, I believe mozilla may be making other changes to SQLite. In particular, I think they may be disabling the locking mechanism since some people use Firefox on NFS mounting filesystems where the locking is broken. Mozilla creates its own lock-file based locks to use in place of the posix advisory locks that SQLite uses by default - or so I am lead to believe. So if you try to access a Firefox SQLite database at the same time that Firefox is trying to access it, the locking might not work right and you could run into some contention and corrupt the database or else read invalid data because firefox is updating the database at the same time you are trying to read it. Let me emphasize that everything in the previous paragraph is hearsay and supposition and could be wildly incorrect. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

