diff options
author | Dan Gudmundsson <[email protected]> | 2011-05-11 15:39:59 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2011-05-11 15:39:59 +0200 |
commit | 7cf4720d344b302093454bfe2f518d98728645ce (patch) | |
tree | 36e2991b2cce1578c81298acdca284489cc81bd5 /lib/mnesia/src | |
parent | 116deb98aa1309039d06530de3351feec1163c3f (diff) | |
download | otp-7cf4720d344b302093454bfe2f518d98728645ce.tar.gz otp-7cf4720d344b302093454bfe2f518d98728645ce.tar.bz2 otp-7cf4720d344b302093454bfe2f518d98728645ce.zip |
Fix mnesia crash when adding index on non loaded tables.
This could happen on ram_copies tables.
Diffstat (limited to 'lib/mnesia/src')
-rw-r--r-- | lib/mnesia/src/mnesia_dumper.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/mnesia/src/mnesia_dumper.erl b/lib/mnesia/src/mnesia_dumper.erl index 644133cf5d..55b9946ae9 100644 --- a/lib/mnesia/src/mnesia_dumper.erl +++ b/lib/mnesia/src/mnesia_dumper.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2010. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. 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 @@ -871,7 +871,11 @@ insert_op(Tid, _, {op, add_index, Pos, TabDef}, InPlace, InitBy) -> startup -> ignore; _ -> - mnesia_index:init_indecies(Tab, Storage, [Pos]) + case val({Tab,where_to_read}) of + nowhere -> ignore; + _ -> + mnesia_index:init_indecies(Tab, Storage, [Pos]) + end end; insert_op(Tid, _, {op, del_index, Pos, TabDef}, InPlace, InitBy) -> |