diff options
author | Dan Gudmundsson <[email protected]> | 2013-05-15 16:08:17 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2013-05-15 16:08:17 +0200 |
commit | 12a8452b1d874683726082c7d6f6dbda83be9cd9 (patch) | |
tree | dc91949ac14591cd77862028ea8fbb44164dfe68 /lib/mnesia/src/mnesia_loader.erl | |
parent | 89939207898fc68a2ee0c080e603aa65fb866b25 (diff) | |
parent | 4f1f29eca9984c33f563b57a4d82f02ed0bf9c21 (diff) | |
download | otp-12a8452b1d874683726082c7d6f6dbda83be9cd9.tar.gz otp-12a8452b1d874683726082c7d6f6dbda83be9cd9.tar.bz2 otp-12a8452b1d874683726082c7d6f6dbda83be9cd9.zip |
Merge branch 'dgud/mnesia/schema_info_in_table/OTP-11030' into maint
* dgud/mnesia/schema_info_in_table/OTP-11030:
mnesia: Fixed bad data in table
Diffstat (limited to 'lib/mnesia/src/mnesia_loader.erl')
-rw-r--r-- | lib/mnesia/src/mnesia_loader.erl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/mnesia/src/mnesia_loader.erl b/lib/mnesia/src/mnesia_loader.erl index 4ba400fbbf..4afbea1cc2 100644 --- a/lib/mnesia/src/mnesia_loader.erl +++ b/lib/mnesia/src/mnesia_loader.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2011. All Rights Reserved. +%% Copyright Ericsson AB 1998-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -487,7 +487,8 @@ finish_copy(Storage,Tab,Cs,SenderPid,DatBin,OrigTabRec) -> subscr_receiver(TabRef = {_, Tab}, RecName) -> receive - {mnesia_table_event, {Op, Val, _Tid}} -> + {mnesia_table_event, {Op, Val, _Tid}} + when element(1, Val) =:= Tab -> if Tab == RecName -> handle_event(TabRef, Op, Val); @@ -496,6 +497,15 @@ subscr_receiver(TabRef = {_, Tab}, RecName) -> end, subscr_receiver(TabRef, RecName); + {mnesia_table_event, {Op, Val, _Tid}} when element(1, Val) =:= schema -> + %% clear_table is faked via two schema events + %% a schema record delete and a write + case Op of + delete -> handle_event(TabRef, clear_table, {Tab, all}); + _ -> ok + end, + subscr_receiver(TabRef, RecName); + {'EXIT', Pid, Reason} -> handle_exit(Pid, Reason), subscr_receiver(TabRef, RecName) |