Subject | RE: [firebird-support] Re: Transactions stepping on each other |
---|---|
Author | Rick Debay |
Post date | 2007-09-17T17:00:33Z |
> Wouldn't VAL_A be included in SUM(VAL_A), so other records must be 0or negative to not break this rule? Or do you mean SUM(Link.VAL_A) must
be less than A.VALUE?
Yes, I meant the sum of Link.VAL_A, not the parent table.
> You could also perform a dummy update likeI just looked up 'select...with lock' in The Firebird Book, and it warns
> update a set value = value where id = ?;
> Or use a select with lock.
that it can't be used with joins or aggregations.
Six pages earlier it mentions that Firebird locks by row, not column.
So my idea of a timestamp on the parent table would mean that any
updates to the parent's row would be blocked until the transaction ends.
Which is good, as there are other tables that are all linked to table A,
and the summation of all these links can't exceed the parent's VALUE.
Thanks, I've got more to think about before I implement, but I think the
concept is now sound.
Disclaimer: This message (including attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. RxStrategies, Inc. shall not be liable for the improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system. RxStrategies, Inc. does not guarantee that the integrity of this communication has been maintained nor that this communication is free from viruses, interceptions or interference.