[sqlite] sqlite database handle caching and write permissions

2010-07-15 Thread JT Olds
Hello all, I have two slightly related questions regarding sqlite database handles. First, I'm developing a system that opens thousands of different sqlite databases at a variety of times, some database handles more often than others, but never the same one multiple times concurrently, though som

Re: [sqlite] sqlite database handle caching and write permissions

2010-07-15 Thread JT Olds
ement will definitively, actually hit disk, whereas filtering by SELECT seemed unclear to me as to whether it would quite cover or catch everything. If that is truly the best way, then that's fine I guess. -JT On Thu, Jul 15, 2010 at 12:25 PM, Simon Slavin wrote: > > On 15 Jul 2010, at

Re: [sqlite] sqlite database handle caching and write permissions

2010-07-15 Thread JT Olds
t 12:41 PM, Jim Morris wrote: > You also need to watch for multiple command separated via ';' > > On 7/15/2010 11:36 AM, JT Olds wrote: >> I considered that also, but I wasn't sure about whether or not that >> guaranteed no disk writes (maybe some sort of fu

Re: [sqlite] sqlite database handle caching and write permissions

2010-07-16 Thread JT Olds
> Unsafe. Using the authorizer callback instead to figure out if a > statement may write the database is a better way: > >   http://www.sqlite.org/c3ref/c_alter_table.html >   http://www.sqlite.org/c3ref/set_authorizer.html Beautiful Dan, thank you. That problem I think has been nailed. Any ideas

[sqlite] fcntl file locks from different threads? (what constitutes a "troublesome system"?)

2010-07-28 Thread JT Olds
I have a large deployment of thousands of SQLite databases accessed from the same multi-threaded process, and up until recently, I didn't even consider thread safety, because 1) I only ever talk to a SQLite database connection from one thread at a time, and 2) I am dumb. I do maintain SQLite data

Re: [sqlite] SQLITE_ENABLE_ATOMIC_WRITE on windows, good or bad?

2010-09-14 Thread JT Olds
On this note, how does one figure out if your system does support atomic writes (or other FS things, like safe appends)? Is there an easy way to have SQLite tell you what it finds out? Alternatively (for my current use case), does Ext3 on 2.6 Linux support atomic writes or safe appends? On Mon,