🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11073

Re: Deadlock error

#11073
From: T. van Rompaey
Date: Fri, 20 Dec 2002 14:42
31 lines
2167 bytes
A deadlock is when a statement (i.e. UPDATE) locks for example row 1 and
then tries to update row 2.
In the mean time another user has locked and edited row 2 and now tries to
update row 1.

So, row 1 is locked by user 1 and row 2 is locked by user 2 who are now both
waiting for the other user to release the lock.

The situation in your last sentence will (in my option) not generate a error
because the second statement will wait till the records are release from the
lock and either 1) try to delete or update a row that already is deleted (=
no problem) or 2) update or delete a row that is updated which will not
generate a database error but you should write your software to prevent
this. (i.e. check how much rows are edited / deleted after the stament and
compare this to what you expect)

Hope this helps,

Greetings,
Thomas

"Edward Diener" <eddielee@tropicsoft.com> wrote in message
news:3dff68ba$1@newsgroups.borland.com...
> What does the IB isc_deadlock error mean ? What is the difference between
it
> and isc_lock_conflict ? If TXA updates or deletes a record and TXB
attempts
> to update or delete that record before TXA has finished, what IB error
> message is received in the exception ?
>
>
Technical Details
Message-ID: <3e032c57$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3dff68ba$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,9f2c74387cedc577
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-20 07:10:09 PST
From: "T. van Rompaey" <tvrompaey@scabbouw.nlNOSPAM>
Newsgroups: borland.public.interbase.sql
References: <3dff68ba$1@newsgroups.borland.com>
Subject: Re: Deadlock error
Date: Fri, 20 Dec 2002 15:42:28 +0100
Lines: 33
Organization: SCAB
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 213.84.36.220
Message-ID: <3e032c57$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1040395351 213.84.36.220 (20 Dec 2002 06:42:31 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail