From: Ivan P. <iva...@se...> - 2007-01-30 22:29:58
|
"Dmitry Yemanov" wrote: >> * It can be raised in the situation one would not expect it - normally >> the DELETE/UPDATE command either succeeds because >> it deletes/updates required record(s), or it succeeds because there is nothing >> to delete/update (e.g. delete from tab where 1=2;) >> But in described situation the DELETE can complain that record >> was already deleted - looks strange. > > I kinda agree. But I think that all related issues should be solved as a > whole. Yes, it would be nice, but not absolutely necessary, there already are situations when different commands have different handling. Example from my post to fb-support: When one transaction locks (updates) row in Master table, then other transactions - can Update related rows in Detail table, but - can't Insert new Detail rows (referencing pk of locked row) > For example, if the concurrent transaction has modified the > record, we need to re-fetch it and re-evaluate booleans. Right, solving situation when concurrent transaction deletes the record is easier, since there is nothing to re-fetch (and it is what I had in mind, see Subject.) >> * Could this error by avoided at all ? If the record was deleted, >> it means there is nothing to delete/update, so from users point of view >> the error has no sense. >> The only problem I see is with Before triggers that were already fired, >> can't they be just silently undone ? > > I fail to see how the trigger actions could be undone for a single > record, sorry. By creating internal savepoint ? (but you know - I do not know the source code ...) Ivan |