Subject | Recursive trigger and deadlock |
---|---|
Author | Valdir Stiebe Junior |
Post date | 2003-11-19T19:26:49Z |
Hi,
We're migrating from FB 1.0.3 to FB 1.5 RC7 both windows.
I have two tables in a master detail relationship with cascade delete rule.
On the detail table i have an after delete trigger that update a third table
based on a field from the master table.
So my detail table after delete trigger look like this...
....
select field from master_table ... into some_variable
if (some_variable ...) then
update third table. ....
With firebird 1.0 this trigger work ok while deleting details. But when deleting
the master, the select statement don't work (i've asked here a year ago about
this, the problem was the cascade delete wich delete the master before deleting
the details rows). To workaround this i've created a trigger on the master table
before delete to delete the details with a delete from ....
Now, with firebird 1.5 i'm getting a deadlock exception on the select statement
of the detail table after delete trigger. And disabling the master table
trigger, i don't get a deadlock exception, but the select don't return any
value.
What is new (and that i missed) that is putting me in deadlock?
TIA
Valdir.
We're migrating from FB 1.0.3 to FB 1.5 RC7 both windows.
I have two tables in a master detail relationship with cascade delete rule.
On the detail table i have an after delete trigger that update a third table
based on a field from the master table.
So my detail table after delete trigger look like this...
....
select field from master_table ... into some_variable
if (some_variable ...) then
update third table. ....
With firebird 1.0 this trigger work ok while deleting details. But when deleting
the master, the select statement don't work (i've asked here a year ago about
this, the problem was the cascade delete wich delete the master before deleting
the details rows). To workaround this i've created a trigger on the master table
before delete to delete the details with a delete from ....
Now, with firebird 1.5 i'm getting a deadlock exception on the select statement
of the detail table after delete trigger. And disabling the master table
trigger, i don't get a deadlock exception, but the select don't return any
value.
What is new (and that i missed) that is putting me in deadlock?
TIA
Valdir.