Subject | Bug-Fix from 2.1 to 2.5 in updating current row values? |
---|---|
Author | André Knappstein |
Post date | 2013-04-11T11:51:27Z |
Hi Gang!
I am asking this on behalf of a friend who is intensively using
Firebird.
He recently switched from 2.1.x to 2.5.x because I recommended him to
do so.
As it turns out, he was constantly doing the following:
UPDATE Invoices
SET AmtVal = :nAmtVal
TotTax = AmtVal * Tax
TotVal = AmtVal + TotTax
WHERE InvNo = :cInvNo;
which was working fine for him in 2.1.x
In 2.5.x he is getting wrong results/row values, unless he changes his
approach to the following:
UPDATE Invoices
SET AmtVal = :nAmtVal
TotTax = :nAmtVal * Tax
TotVal = :nAmtVal + TotTax
WHERE InvNo = :cInvNo;
Personally I'd never had even tried the first approach, so I can only
guess that up to 2.1 it was possible to read a value just updated in
the same transaction which is no longer possible in 2.5.x.
Am I right in telling him that what was working for him in 2.1
was something like bad design on his side, supported by something that
can be called a bug in Firebird which was now fixed or a flaw which
now has been improved?
What really is important:
Does he have any other choice but to re-check his 1.200 stored
procedures and replace the field-value identifiers by the input
parameter identifiers?
thanks
André
I am asking this on behalf of a friend who is intensively using
Firebird.
He recently switched from 2.1.x to 2.5.x because I recommended him to
do so.
As it turns out, he was constantly doing the following:
UPDATE Invoices
SET AmtVal = :nAmtVal
TotTax = AmtVal * Tax
TotVal = AmtVal + TotTax
WHERE InvNo = :cInvNo;
which was working fine for him in 2.1.x
In 2.5.x he is getting wrong results/row values, unless he changes his
approach to the following:
UPDATE Invoices
SET AmtVal = :nAmtVal
TotTax = :nAmtVal * Tax
TotVal = :nAmtVal + TotTax
WHERE InvNo = :cInvNo;
Personally I'd never had even tried the first approach, so I can only
guess that up to 2.1 it was possible to read a value just updated in
the same transaction which is no longer possible in 2.5.x.
Am I right in telling him that what was working for him in 2.1
was something like bad design on his side, supported by something that
can be called a bug in Firebird which was now fixed or a flaw which
now has been improved?
What really is important:
Does he have any other choice but to re-check his 1.200 stored
procedures and replace the field-value identifiers by the input
parameter identifiers?
thanks
André