Cursor lock and sql command

Ivan Smahin ivan_smahin at paradigmasoft.com
Tue Jul 29 07:02:17 CDT 2014


On Jul 26, 2014, at 7:22 PM, François Van Lerberghe <frvanlerberghe at gmail.com> wrote:

> Thank you Ruslan for this clear answer.
> 
> Just a question about your explanation below : In Vstudio 4.3, If I create a
> Vcursor (SELECT...) with RW lock and next send an UPDATE command touching a
> locked record, the record is updated without raising an error and I can see
> the change immediately on the locked cursor !
> Is it the intended behavior or are you doing something special behind the
> scene ?

Currently, locking policy is applied to cursors only.
There are no check for locked records during add/update/delete. We do that checks on creating cursor stage instead.
Assume, some cursor locks some records with exclusive lock. This means that no other cursor can lock that records either for reading or writing access (you will get an error). There is more freedom for shared lock (read-only) case. In this case, others may lock that records for reading as well (but not for writing). 
Also we prohibit add/update/delete operations for read-only cursors.


-- 
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list