aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_log.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-09-21 12:01:38 +0200
committerDan Gudmundsson <[email protected]>2011-09-21 12:01:38 +0200
commit2629a629a2f5b16067d9ca6f99be9711c52bf9ca (patch)
treefb42051c10580839316697db0a6912b8d7fbc2a3 /lib/mnesia/src/mnesia_log.erl
parent41f5777aea48b2eec358c342b7fd8610bf13601c (diff)
parent533aeba2211bc29bf2a207737d74ffa52a46bdec (diff)
downloadotp-2629a629a2f5b16067d9ca6f99be9711c52bf9ca.tar.gz
otp-2629a629a2f5b16067d9ca6f99be9711c52bf9ca.tar.bz2
otp-2629a629a2f5b16067d9ca6f99be9711c52bf9ca.zip
Merge branch 'dgud/mnesia/cleartable-ded-api/OTP-9558' into dev
* dgud/mnesia/cleartable-ded-api/OTP-9558: [mnesia] Use dedicated api for clearing tables
Diffstat (limited to 'lib/mnesia/src/mnesia_log.erl')
-rw-r--r--lib/mnesia/src/mnesia_log.erl5
1 files changed, 3 insertions, 2 deletions
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.