Subject | Re: [firebird-support] Deadlock |
---|---|
Author | Lucas Franzen |
Post date | 2004-08-10T19:02:14Z |
Steve,
sgharp schrieb:
update) involved?
Can you execute this procedure on its own?
Is ID your primary key?
Does your procedure spCalc do anything else, or just summing up?
Luc.
sgharp schrieb:
> Hi All,What do you think is the problem?
>
> I have the following stored procedure that is failing with a
> deadlock. I think I know why it's failing but I don't know how to
> resolve it.
>Remove this suspend, what it is good for in your case?
> create procedure spCalcPrice
> as
> declare variable iID Integer;
> declare variable dPrice Double Precision;
> begin
> for select ID
> from mytable
> order by ID
> into :iID
> do
> Begin
> execute procedure spCacl(:iID) returning_values :dPrice;
>
> update mytable
> set Price = :dPrice
> where (ID = :iID);
> End
>
> suspend;
> I'm getting a message, "deadlock. update conflicts with concurrentAre you sure it is *just* the procedure, there's nothing else (another
> update." and the price is not being updated. How can I structure
> this to resolve this error?
update) involved?
Can you execute this procedure on its own?
Is ID your primary key?
Does your procedure spCalc do anything else, or just summing up?
Luc.