aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2010-03-03 12:00:00 +0100
committerBjörn Gustavsson <[email protected]>2010-08-20 08:43:26 +0200
commit2fe5bce0ff7998ed4dcc833a4ae9b4b5feb450e2 (patch)
tree123c04445d7b1ad6f8250dd9bb09d471cdf6de1a /lib/snmp/src/agent
parentdfd80f7cea795bfb3a35eaea2c0bc98960002aa2 (diff)
downloadotp-2fe5bce0ff7998ed4dcc833a4ae9b4b5feb450e2.tar.gz
otp-2fe5bce0ff7998ed4dcc833a4ae9b4b5feb450e2.tar.bz2
otp-2fe5bce0ff7998ed4dcc833a4ae9b4b5feb450e2.zip
snmp: Patch erl_1108
OTP-8480 [agent] A minor mnesia related performance improvement. OTP-8481 [manager] Fixed an upgrade/downgrade problem. Upgrade/downgrade from/to 4.13.5 did not work for the net-if process. This has now been fixed
Diffstat (limited to 'lib/snmp/src/agent')
-rw-r--r--lib/snmp/src/agent/snmpa_general_db.erl19
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/snmp/src/agent/snmpa_general_db.erl b/lib/snmp/src/agent/snmpa_general_db.erl
index 795c353a9e..a06604c9cf 100644
--- a/lib/snmp/src/agent/snmpa_general_db.erl
+++ b/lib/snmp/src/agent/snmpa_general_db.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2000-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2000-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(snmpa_general_db).
@@ -114,14 +114,7 @@ ets_open(Name, Dir, clear, Type) ->
mnesia_open({table_exist,Name},_Nodes,_RecName,_Attr,_Type,clear) ->
?vtrace("[mnesia] database ~p already exists; clear content",[Name]),
- Pattern = '_',
- F = fun() ->
- Recs = mnesia:match_object(Name,Pattern,read),
- lists:foreach(fun(Rec) ->
- mnesia:delete_object(Name,Rec,write)
- end, Recs),
- Recs
- end,
+ F = fun() -> mnesia:clear_table(Name) end,
case mnesia:transaction(F) of
{aborted,Reason} ->
exit({aborted,Reason});