Re: [sqlite] readers and writer

2009-10-14 Thread Simon Slavin
On 14 Oct 2009, at 11:19pm, Roger Binns wrote: > Simon Slavin wrote: >> On 14 Oct 2009, at 7:45pm, Pavel Ivanov wrote: >> >>> sqlite> .timeout 1 >> >> What is it that that command does ? I looked for a PRAGMA but didn't >> find one. Or does it correspond to a check-and-retry loop which the

Re: [sqlite] readers and writer

2009-10-14 Thread priimak
Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Simon Slavin wrote: > >> On 14 Oct 2009, at 7:45pm, Pavel Ivanov wrote: >> >> >>> sqlite> .timeout 1 >>> >> What is it that that command does ? I looked for a PRAGMA but didn't >> find one. Or does it co

Re: [sqlite] readers and writer

2009-10-14 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon Slavin wrote: > On 14 Oct 2009, at 7:45pm, Pavel Ivanov wrote: > >> sqlite> .timeout 1 > > What is it that that command does ? I looked for a PRAGMA but didn't > find one. Or does it correspond to a check-and-retry loop which the > pr

Re: [sqlite] readers and writer

2009-10-14 Thread Simon Slavin
On 14 Oct 2009, at 7:45pm, Pavel Ivanov wrote: > sqlite> .timeout 1 What is it that that command does ? I looked for a PRAGMA but didn't find one. Or does it correspond to a check-and-retry loop which the programmer has to do yourself in her or his own code ? Simon. __

Re: [sqlite] readers and writer

2009-10-14 Thread Pavel Ivanov
> If there is a timeout and it is set to 0 by default then that it is not > very useful. It's indeed so and it's useful in some cases. And you know, everything can be tested pretty easily. Just make some test database and execute in one terminal: sqlite> create table t (a); sqlite> begin; sqlite>

Re: [sqlite] readers and writer

2009-10-14 Thread priimak
Simon Slavin wrote: > On 14 Oct 2009, at 5:39am, Dmitri Priimak wrote: > > >> Yes, I understood that, but the impression I got is that SELECT will >> place shared lock on the database. While INSERT or UPDATE will first >> place PENDING lock indicating that it wants to write. >> > > Okay, I

Re: [sqlite] readers and writer

2009-10-14 Thread Simon Slavin
On 14 Oct 2009, at 5:39am, Dmitri Priimak wrote: > Yes, I understood that, but the impression I got is that SELECT will > place shared lock on the database. While INSERT or UPDATE will first > place PENDING lock indicating that it wants to write. Okay, I see what you mean. I don't know how long

Re: [sqlite] readers and writer

2009-10-14 Thread priimak
Edzard Pasma wrote: > --- prii...@stanford.edu wrote: > >> Simon Slavin wrote: >> >>> On 14 Oct 2009, at 1:21am, priimak wrote: >>> >>> >>> I am heaving small problem with sqlite. I have a webapp which connects to the database using sqlite-jdbc and performs SELECTs to re

Re: [sqlite] readers and writer

2009-10-14 Thread Edzard Pasma
--- prii...@stanford.edu wrote: > > Simon Slavin wrote: >> On 14 Oct 2009, at 1:21am, priimak wrote: >> >> >>> I am heaving small problem with sqlite. I have a webapp which connects >>> to the database using sqlite-jdbc and performs SELECTs to response to >>> different GET requests, while this

Re: [sqlite] readers and writer

2009-10-13 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon Slavin wrote: > What I will say is this: I see no reason why there > should be more bugs in the AFP locking code than there are in the > locking code that comes into play if you're accessing a file on your > own hard disk. In which case yo

Re: [sqlite] readers and writer

2009-10-13 Thread Dmitri Priimak
Simon Slavin wrote: > On 14 Oct 2009, at 1:21am, priimak wrote: > > >> I am heaving small problem with sqlite. I have a webapp which connects >> to the database using sqlite-jdbc and performs SELECTs to response to >> different GET requests, while this happens if I try to write to a >> database

Re: [sqlite] readers and writer

2009-10-13 Thread Simon Slavin
On 14 Oct 2009, at 3:37am, Roger Binns wrote: > Are you willing to stake your reputation and whatever else on there > being > bug free implementations of AFP and SMB. (BTW in a past life I > coded an SMB > server - the other clients and servers out there are definitely not > bug free :-) >

Re: [sqlite] readers and writer

2009-10-13 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon Slavin wrote: > Perhaps this passage could be rephrased to warn explicitly about NFS > rather than about the more general "files on a network filesystem". As a general rule network filesystems are buggy. Local filesystems get to make all the

Re: [sqlite] readers and writer

2009-10-13 Thread Jean-Christophe Deschamps
´¯¯¯ >So if a SELECT is in progress, other SELECT commands can be allowed to >proceed without problems. But no INSERT or UPDATE can be allowed until >the SELECT is finished. Hence you will sometimes get a lock on the >write. > >How you deal with this, I don't know. Random wait-and-try-again ? `

Re: [sqlite] readers and writer

2009-10-13 Thread Simon Slavin
On 14 Oct 2009, at 1:21am, priimak wrote: > http://www.sqlite.org/lockingv3.html By the way, I just read some of that page and a bit of it, while possibly technically correct, may be putting some people off from using SQLite. "One should note that POSIX advisory locking is known to be buggy

Re: [sqlite] readers and writer

2009-10-13 Thread Simon Slavin
On 14 Oct 2009, at 1:21am, priimak wrote: > I am heaving small problem with sqlite. I have a webapp which connects > to the database using sqlite-jdbc and performs SELECTs to response to > different GET requests, while this happens if I try to write to a > database ( UPDATE or INSERT ) from comma

[sqlite] readers and writer

2009-10-13 Thread priimak
Hi. I am heaving small problem with sqlite. I have a webapp which connects to the database using sqlite-jdbc and performs SELECTs to response to different GET requests, while this happens if I try to write to a database ( UPDATE or INSERT ) from command line, that (i.e. update process) would o