Re: [sqlite] SQLITE transactions failing with multiple threads

2010-11-30 Thread Simon Slavin
On 30 Nov 2010, at 8:11pm, cricketfan wrote: > Drake, I am using SQLITE in threadsafe mode. Transaction inside another > transaction isnt that equivalent of nested transactions? Should that be > allowed? I have no problem opening another handle but just trying to > understand the intricacies, tha

Re: [sqlite] SQLITE transactions failing with multiple threads

2010-11-30 Thread cricketfan
Drake, It is in serialized mode. Opening another handle did resolve the issue. I am doing inserts in one thread and then if necessary update the same using another thread. Drake Wilson-3 wrote: > > Quoth cricketfan , on 2010-11-30 12:11:52 -0800: >> Drake, I am using SQLITE in threads

Re: [sqlite] SQLITE transactions failing with multiple threads

2010-11-30 Thread Drake Wilson
Quoth cricketfan , on 2010-11-30 12:11:52 -0800: > Drake, I am using SQLITE in threadsafe mode. Transaction inside another > transaction isnt that equivalent of nested transactions? Should that be > allowed? SQLite has named savepoints, but not nested BEGIN transactions. It's hard to tell what ex

Re: [sqlite] SQLITE transactions failing with multiple threads

2010-11-30 Thread cricketfan
Drake, I am using SQLITE in threadsafe mode. Transaction inside another transaction isnt that equivalent of nested transactions? Should that be allowed? I have no problem opening another handle but just trying to understand the intricacies, thanks. Drake Wilson-3 wrote: > > Quoth cricketfan , o

Re: [sqlite] SQLITE transactions failing with multiple threads

2010-11-30 Thread Simon Slavin
On 30 Nov 2010, at 3:49pm, cricketfan wrote: >I have 2 threads in my program, 1st thread is doing inserts into a > table and 2nd thread is trying to update the already inserted columns. > 1. I have bundled the 1000 inserts per transaction in 1st thread. > 2. When I try to start a transac

Re: [sqlite] SQLITE transactions failing with multiple threads

2010-11-30 Thread Drake Wilson
Quoth cricketfan , on 2010-11-30 07:49:36 -0800: > Also not that both threads are > using the same handle passed by main. No, don't do that. Using the same handle in two threads concurrently can break depending on the SQLite threading mode, and will gain you no parallelism in the modes where it w