diff options
author | Dan Gudmundsson <[email protected]> | 2011-05-12 10:12:40 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2011-05-12 10:12:40 +0200 |
commit | eb26a54528e824f8f08af49d47281201bd8fefe3 (patch) | |
tree | 073eeb4dad1cec9dc697e46d79e3f5f2d07dab5d /lib/mnesia/src | |
parent | 0bb1fa0f175f00b57f36070ab90a944b700da882 (diff) | |
parent | 7cf4720d344b302093454bfe2f518d98728645ce (diff) | |
download | otp-eb26a54528e824f8f08af49d47281201bd8fefe3.tar.gz otp-eb26a54528e824f8f08af49d47281201bd8fefe3.tar.bz2 otp-eb26a54528e824f8f08af49d47281201bd8fefe3.zip |
Merge branch 'dgud/mnesia/add_index_crash/OTP-9285' into dev
* dgud/mnesia/add_index_crash/OTP-9285:
Fix mnesia crash when adding index on non loaded 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) -> |