Record locking /Vserver and relations

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Dec 6 10:59:42 CST 2004


On 12/7/04 2:28 AM, "Ralf Sander" <ralf at end-if.de> wrote:

> What will happen in the following case:
> I want to get a read/write cursor for a record that I want to delete.
> This record has related records (via object pointer)  with option
> "CASCADE" and is in the parent table. One of the related records is in
> use by another user. Will I get the cursor anyhow and will the parent
> be deleted and the child not or what will happen?

Hi Ralf,

So you have 

    parent table T1
    child table  T2

Other user have cursor on T2, so it lock record(s) of T2.

You have cursor on T1, so you lock record(s) of T1.
Yes you will get cursor on T1 because there is no lock-conflict.

If you will try to delete record from t1 which have linked child record in
T2 but it is locked by other user then you will get refuse. And any record
will not be deleted.

Parent record cannot be deleted until at least one child records exists,
because you have specify CASCADE. Otherwise we get referential integrity
failure.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina mailing list