diff options
Diffstat (limited to 'lib/mnesia')
-rw-r--r-- | lib/mnesia/doc/src/mnesia.xml | 4 | ||||
-rw-r--r-- | lib/mnesia/doc/src/mnesia_frag_hash.xml | 2 | ||||
-rw-r--r-- | lib/mnesia/src/mnesia.appup.src | 2 | ||||
-rw-r--r-- | lib/mnesia/src/mnesia_dumper.erl | 2 | ||||
-rw-r--r-- | lib/mnesia/src/mnesia_lib.erl | 6 | ||||
-rw-r--r-- | lib/mnesia/src/mnesia_log.erl | 5 | ||||
-rw-r--r-- | lib/mnesia/src/mnesia_recover.erl | 6 | ||||
-rw-r--r-- | lib/mnesia/vsn.mk | 2 |
8 files changed, 20 insertions, 9 deletions
diff --git a/lib/mnesia/doc/src/mnesia.xml b/lib/mnesia/doc/src/mnesia.xml index 7a8f796cee..19ec70118f 100644 --- a/lib/mnesia/doc/src/mnesia.xml +++ b/lib/mnesia/doc/src/mnesia.xml @@ -246,7 +246,7 @@ If a new item is inserted with the same key as </p> </item> <item> - <p><c>{max,MaxTabs}</c><c>MaxTabs</c> is a list of + <p><c>{max,MaxTabs}</c>. <c>MaxTabs</c> is a list of tables that should be included in the checkpoint. The default is []. For these tables, the redundancy will be maximized and checkpoint information will be retained together @@ -274,7 +274,7 @@ If a new item is inserted with the same key as </p> </item> <item> - <p><c>{ram_overrides_dump,Bool} </c> Only applicable + <p><c>{ram_overrides_dump,Bool}</c>. Only applicable for <c>ram_copies</c>. <c>Bool</c> allows you to choose to backup the table state as it is in RAM, or as it is on disc. <c>true</c> means that the latest committed diff --git a/lib/mnesia/doc/src/mnesia_frag_hash.xml b/lib/mnesia/doc/src/mnesia_frag_hash.xml index 73162c3974..665796f20d 100644 --- a/lib/mnesia/doc/src/mnesia_frag_hash.xml +++ b/lib/mnesia/doc/src/mnesia_frag_hash.xml @@ -64,7 +64,7 @@ <p>Note that the <c>add_frag/2</c> function will be invoked one time each for the rest of the fragments (all but number 1) as a part of the table creation procedure.</p> - <p><c>State</c> is the initial value of the <c>hash_state</c><c>frag_property</c>. The <c>NewState</c> will be stored as + <p><c>State</c> is the initial value of the <c>hash_state</c> <c>frag_property</c>. The <c>NewState</c> will be stored as <c>hash_state</c> among the other <c>frag_properties</c>. </p> </desc> diff --git a/lib/mnesia/src/mnesia.appup.src b/lib/mnesia/src/mnesia.appup.src index 3691aa249a..fe4e5e2e7a 100644 --- a/lib/mnesia/src/mnesia.appup.src +++ b/lib/mnesia/src/mnesia.appup.src @@ -1,11 +1,13 @@ %% -*- erlang -*- {"%VSN%", [ + {"4.4.19", [{restart_application, mnesia}]}, {"4.4.18", [{restart_application, mnesia}]}, {"4.4.17", [{restart_application, mnesia}]}, {"4.4.16", [{restart_application, mnesia}]} ], [ + {"4.4.19", [{restart_application, mnesia}]}, {"4.4.18", [{restart_application, mnesia}]}, {"4.4.17", [{restart_application, mnesia}]}, {"4.4.16", [{restart_application, mnesia}]} diff --git a/lib/mnesia/src/mnesia_dumper.erl b/lib/mnesia/src/mnesia_dumper.erl index daa9e6aff2..f8d7664156 100644 --- a/lib/mnesia/src/mnesia_dumper.erl +++ b/lib/mnesia/src/mnesia_dumper.erl @@ -364,7 +364,7 @@ dets_insert(Op,Tab,Key,Val) -> ok = dets:delete_object(Tab, Val); clear_table -> dets_cleared(Tab), - ok = dets:match_delete(Tab, '_') + ok = dets:delete_all_objects(Tab) end. dets_updated(Tab,Key) -> diff --git a/lib/mnesia/src/mnesia_lib.erl b/lib/mnesia/src/mnesia_lib.erl index 7e926a6258..e8b8c58c70 100644 --- a/lib/mnesia/src/mnesia_lib.erl +++ b/lib/mnesia/src/mnesia_lib.erl @@ -1141,12 +1141,18 @@ db_erase(ram_copies, Tab, Key) -> ?ets_delete(Tab, Key), ok; db_erase(disc_copies, Tab, Key) -> ?ets_delete(Tab, Key), ok; db_erase(disc_only_copies, Tab, Key) -> dets:delete(Tab, Key). +db_match_erase(Tab, '_') -> + db_delete_all(val({Tab, storage_type}),Tab); db_match_erase(Tab, Pat) -> db_match_erase(val({Tab, storage_type}), Tab, Pat). db_match_erase(ram_copies, Tab, Pat) -> ?ets_match_delete(Tab, Pat), ok; db_match_erase(disc_copies, Tab, Pat) -> ?ets_match_delete(Tab, Pat), ok; db_match_erase(disc_only_copies, Tab, Pat) -> dets:match_delete(Tab, Pat). +db_delete_all(ram_copies, Tab) -> ets:delete_all_objects(Tab); +db_delete_all(disc_copies, Tab) -> ets:delete_all_objects(Tab); +db_delete_all(disc_only_copies, Tab) -> dets:delete_all_objects(Tab). + db_first(Tab) -> db_first(val({Tab, storage_type}), Tab). db_first(ram_copies, Tab) -> ?ets_first(Tab); diff --git a/lib/mnesia/src/mnesia_log.erl b/lib/mnesia/src/mnesia_log.erl index 9e804cc4c2..94153473cb 100644 --- a/lib/mnesia/src/mnesia_log.erl +++ b/lib/mnesia/src/mnesia_log.erl @@ -1021,7 +1021,8 @@ add_recs([LogH|Rest], N) LogH#log_header.log_version >= "1.0" -> add_recs(Rest, N); add_recs([{{Tab, _Key}, _Val, clear_table} | Rest], N) -> - true = ets:match_delete(Tab, '_'), - add_recs(Rest, N+ets:info(Tab, size)); + Size = ets:info(Tab, size), + true = ets:delete_all_objects(Tab), + add_recs(Rest, N+Size); add_recs([], N) -> N. diff --git a/lib/mnesia/src/mnesia_recover.erl b/lib/mnesia/src/mnesia_recover.erl index b3eed1de6e..4750291a10 100644 --- a/lib/mnesia/src/mnesia_recover.erl +++ b/lib/mnesia/src/mnesia_recover.erl @@ -227,11 +227,13 @@ do_log_decision(D, DoTell, NodeD) -> note_outcome(D2), case mnesia_monitor:use_dir() of true -> - mnesia_log:append(latest_log, D2), if DoTell == true, Outcome /= unclear -> tell_im_certain(NodeD#decision.disc_nodes--[node()],D2), - tell_im_certain(NodeD#decision.ram_nodes--[node()], D2); + tell_im_certain(NodeD#decision.ram_nodes--[node()], D2), + mnesia_log:log(D2); + Outcome /= unclear -> + mnesia_log:log(D2); true -> ignore end; diff --git a/lib/mnesia/vsn.mk b/lib/mnesia/vsn.mk index 2fa629d064..a21ab007ef 100644 --- a/lib/mnesia/vsn.mk +++ b/lib/mnesia/vsn.mk @@ -1 +1 @@ -MNESIA_VSN = 4.4.19 +MNESIA_VSN = 4.5 |