aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_schema.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-11-07 12:38:43 +0100
committerDan Gudmundsson <[email protected]>2011-11-07 14:19:55 +0100
commit8ea0daa2917cbfa42e1e1d0ac861abc931860b68 (patch)
tree50d972a8b8b44867b74d54d0118eb733ed166b88 /lib/mnesia/src/mnesia_schema.erl
parent63f4750fe4bc3249958d9397a9f5e4453fd35042 (diff)
downloadotp-8ea0daa2917cbfa42e1e1d0ac861abc931860b68.tar.gz
otp-8ea0daa2917cbfa42e1e1d0ac861abc931860b68.tar.bz2
otp-8ea0daa2917cbfa42e1e1d0ac861abc931860b68.zip
[mnesia] Fix deadlock in aborted mnesia:del_table_copy/2
Diffstat (limited to 'lib/mnesia/src/mnesia_schema.erl')
-rw-r--r--lib/mnesia/src/mnesia_schema.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mnesia/src/mnesia_schema.erl b/lib/mnesia/src/mnesia_schema.erl
index f533fa5463..179e15197e 100644
--- a/lib/mnesia/src/mnesia_schema.erl
+++ b/lib/mnesia/src/mnesia_schema.erl
@@ -2373,11 +2373,12 @@ undo_prepare_op(Tid, {op, add_table_copy, Storage, Node, TabDef}) ->
undo_prepare_op(_Tid, {op, del_table_copy, _, Node, TabDef})
when Node == node() ->
+ WriteLocker = get(mnesia_lock),
+ WriteLocker =/= undefined andalso (WriteLocker ! die),
Cs = list2cs(TabDef),
Tab = Cs#cstruct.name,
mnesia_lib:set({Tab, where_to_read}, Node);
-
undo_prepare_op(_Tid, {op, change_table_copy_type, N, FromS, ToS, TabDef})
when N == node() ->
Cs = list2cs(TabDef),