Re: [sqlite] SQlite3 Locking Question

2012-04-05 Thread Jay A. Kreibich
On Thu, Apr 05, 2012 at 07:29:48PM +0200, Andreas Wiencke scratched on the wall: > >> In my code I want to read from one table and write the results to > >> another table. But if I don't fetch all the results and close the > >> reading connection, I cannot write to another table in the same > >> da

Re: [sqlite] SQlite3 Locking Question

2012-04-05 Thread Andreas Wiencke
>> In my code I want to read from one table and write the results to >> another table. But if I don't fetch all the results and close the >> reading connection, I cannot write to another table in the same >> database. > >  Do it all from the same connection.  The locks are "owned" by a >  database

Re: [sqlite] SQlite3 Locking Question

2012-04-05 Thread Jay A. Kreibich
On Thu, Apr 05, 2012 at 03:15:37PM +0100, Simon Slavin scratched on the wall: > On 5 Apr 2012, at 3:04pm, Andreas Wiencke wrote: > > In my code I want to read from one table and write the results to > > another table. But if I don't fetch all the results and close the > > reading connection, I ca

Re: [sqlite] SQlite3 Locking Question

2012-04-05 Thread Simon Slavin
On 5 Apr 2012, at 3:15pm, Richard Hipp wrote: > Probably the $r query is not being finalized, and is thus holding the read > lock, preventing the subsequent write from happening. You shouldn't have > to close the connection in order to finalize the query - but I don't know > the PHP syntax for

Re: [sqlite] SQlite3 Locking Question

2012-04-05 Thread Jay A. Kreibich
On Thu, Apr 05, 2012 at 04:04:23PM +0200, Andreas Wiencke scratched on the wall: > > Hello, > > I have a question regarding the locking in Sqlite3: Does Sqlite3 > lock the entire database when there is a lock on only one table? The whole database. http://sqlite.org/lockingv3.html > In my cod

Re: [sqlite] SQlite3 Locking Question

2012-04-05 Thread Simon Slavin
On 5 Apr 2012, at 3:04pm, Andreas Wiencke wrote: > I have a question regarding the locking in Sqlite3: Does Sqlite3 lock the > entire database when there is a lock on only one table? Yes. In fact it locks the entire database when there's only reason to lock one row. Either nothing or everyt

Re: [sqlite] SQlite3 Locking Question

2012-04-05 Thread Richard Hipp
On Thu, Apr 5, 2012 at 10:04 AM, Andreas Wiencke wrote: > > Hello, > > I have a question regarding the locking in Sqlite3: Does Sqlite3 lock the > entire database when there is a lock on only one table? > In my code I want to read from one table and write the results to another > table. But if I d

Re: [sqlite] SQlite3 Locking Question

2012-04-05 Thread Pavel Ivanov
> I have a question regarding the locking in Sqlite3: Does Sqlite3 lock the > entire database when there is a lock on only one table? Yes. > But if I don't fetch all the results and close the reading > connection, I cannot write to another table in the same database. Is this the > intended beha

[sqlite] SQlite3 Locking Question

2012-04-05 Thread Andreas Wiencke
Hello, I have a question regarding the locking in Sqlite3: Does Sqlite3 lock the entire database when there is a lock on only one table? In my code I want to read from one table and write the results to another table. But if I don't fetch all the results and close the reading connection, I cann