> #1 WAL COMMIT will not corrupt current reading thread (even if deletes occur, 
> changes/adds are not visible either).
> #2 Next SELECT transaction will pick up the new data.
> Correct?

Yes that's correct.

> Dangerous thing would be two threads writing if either one is using a currect 
> SELECT for it's updatable dataset.  Is this even possible?

No. WAL journal mode still doesn't allow 2 concurrent writers.


Pavel

On Wed, Aug 18, 2010 at 11:10 AM, Black, Michael (IS)
<michael.bla...@ngc.com> wrote:
> So....to clarify...this is a completely safe operation in 3.7.0.1.???
>
> #1 WAL COMMIT will not corrupt current reading thread (even if deletes occur, 
> changes/adds are not visible either).
> #2 Next SELECT transaction will pick up the new data.
> Correct?
>
> Dangerous thing would be two threads writing if either one is using a currect 
> SELECT for it's updatable dataset.  Is this even possible?
>
> Michael D. Black
> Senior Scientist
> Advanced Analytics Directorate
> Northrop Grumman Information Systems
>
>
> ________________________________
>
> From: sqlite-users-boun...@sqlite.org on behalf of Pavel Ivanov
> Sent: Wed 8/18/2010 9:57 AM
> To: General Discussion of SQLite Database
> Subject: EXTERNAL:Re: [sqlite] multiple conections for the same database
>
>
>
>> Which means the read works on old data until you COMMIT?
>> Is that true?  So that COMMIT will allow you to query the changed/new data 
>> from the other thread?
>
> AFAIK, no. Of course until you COMMIT no reader will see your data.
> But after you commit all already started reading transactions won't
> see your changes. Reading transaction should be started after COMMIT
> to see changes.
>
>
> Pavel
>
> On Wed, Aug 18, 2010 at 10:50 AM, Black, Michael (IS)
> <michael.bla...@ngc.com> wrote:
>> Which means the read works on old data until you COMMIT?
>> Is that true?  So that COMMIT will allow you to query the changed/new data 
>> from the other thread?
>>
>> Michael D. Black
>> Senior Scientist
>> Advanced Analytics Directorate
>> Northrop Grumman Information Systems
>>
>>
>> ________________________________
>>
>> From: sqlite-users-boun...@sqlite.org on behalf of Pavel Ivanov
>> Sent: Wed 8/18/2010 9:15 AM
>> To: General Discussion of SQLite Database
>> Subject: EXTERNAL:Re: [sqlite] multiple conections for the same database
>>
>>
>>
>>> SQLite allows multiple readers, or exactly one wrier, accessing the 
>>> database at the same time. You can't read and write simultaneously, you 
>>> must arrange for your connections to take turns. SQLITE_BUSY error is a 
>>> signal for you to back off, wait a little, then try again. See also 
>>> http://sqlite.org/c3ref/busy_timeout.html
>>
>> A little correction to this: in latest version (3.7.0.1) with WAL
>> journal mode SQLite can read old data while another connection
>> writing. So things could be a little easier for you.
>>
>>
>> Pavel
>>
>> On Wed, Aug 18, 2010 at 8:11 AM, Igor Tandetnik <itandet...@mvps.org> wrote:
>>> andres felipe tamayo cortes <andrewt12...@hotmail.com> wrote:
>>>> i have one application who reads a database, it run well without problems, 
>>>> but when i tried to load this dabase from other
>>>> program (while its still running the first application), appearsme 
>>>> database blocked, isnt it possible to load one database from
>>>> more than one programm at time?
>>>>
>>>> what i am tring to do its that one program reads the database while other 
>>>> program writes so the first program has to see what the
>>>> second programs write.
>>>
>>> SQLite allows multiple readers, or exactly one wrier, accessing the 
>>> database at the same time. You can't read and write simultaneously, you 
>>> must arrange for your connections to take turns. SQLITE_BUSY error is a 
>>> signal for you to back off, wait a little, then try again. See also 
>>> http://sqlite.org/c3ref/busy_timeout.html
>>> --
>>> Igor Tandetnik
>>>
>>> _______________________________________________
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to