The locking is well documented, but it's not vary clear that the
BEGIN command can be used to acquire locks.  The relation between the
different locking stats and parameters to the BEGIN command could be
spelled out.

For example:
BEGIN IMMEDIATE -> RESERVED lock
(Check this, it may not be factual.)

I think what confused me the most was:
http://www.sqlite.org/lockingv3.html

Under: 7.0 Transaction Control At The SQL Level

> The SQL command "BEGIN TRANSACTION" (the TRANSACTION keyword is
> optional) is used to take SQLite out of autocommit mode. Note that the
> BEGIN command does not acquire any locks on the database. After a
> BEGIN command, a SHARED lock will be acquired when the first SELECT
> statement is executed. A RESERVED lock will be acquired when the first
> INSERT, UPDATE, or DELETE statement is executed.

This makes it sound like the only way to acquire a RESERVED lock is to
use a BEGIN/UPDATE combo.  I was about ready to create a table for me
to update, but then I asked on IRC and quotemstr directed me back the
the BEGIN command.

Thank you.

I'm not receiving mail from the list, so please CC me on replies.  Also
notify me if you would not like to be CCed on replies.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to