Martin Alfredsson <[EMAIL PROTECTED]> wrote:
> Snipped this from http://www.sqlite.org/cvstrac/wiki?p=DatabaseIsLocked
> 
>  >Trying to write to a table while a SELECT is active on that same table.
>  >As of check-in [3355] <http://www.sqlite.org/cvstrac/chngview?cn=3355> 
> (2006-08-16 after version 3.3.7) this is now allowed.
> 
> Is this true, will it be included in 3.3.8 ?
> Any time estimate when release with this is released ?
> 

Hold on there!  Check-in [3355] does *not* permit writing to views.
Check-in [3355] has to do with what operations you are allowed to
do on the database while a SELECT is pending.  In other words, it
has to do with using an sqlite3_exec() that is issued from within the
callback of another sqlite3_exec().  Or what changes you can make
using one prepared statement while a second prepared statement
still has not returned SQLITE_DONE or been finalized.

It has always been the case that while reading one table in SQLite,
you could simulatenously write to a separate table using the same
database connection.  But you could not, formerly, write to the
same table you were reading.

You could not, for example, do this (in TCL):

   db eval {SELECT rowid, * FROM table1} {
     db eval {UPDATE table1 SET x=y+2 WHERE rowid=$rowid}
   }

Check-in [3355] relaxes this restriction.  After check-in [3355],
you are allowed to modify a table that is being used in a SELECT
statement using a parallel statement or within the callback from
sqlite3_exec().
--
D. Richard Hipp   <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to