~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/mnesia/examples/bup.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20090215164252-dxpjjuq108nz4noa
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
    %% Change node name
134
134
    {ok,_} = change_node_name(Mod, ThisNode, OtherNode, OldBup, NewBup),
135
135
    ok = rpc:call(OtherNode, mnesia, install_fallback, [NewBup, Mod]),
136
 
    {NewStartRes,[]} = rpc:multicall(NewNodes, mnesia, start, []),
 
136
    {_NewStartRes,[]} = rpc:multicall(NewNodes, mnesia, start, []),
137
137
    rpc:call(OtherNode, mnesia, wait_for_tables, [[bup_rec], infinity]),
138
138
    Wild = rpc:call(OtherNode, mnesia, table_info, [bup_rec, wild_pattern]),
139
139
    NewRecs = rpc:call(OtherNode, mnesia, dirty_match_object, [Wild]),
213
213
display(State, [Tab | Tabs]) ->
214
214
    Counters = match_tab(State#state.counter_tab, Tab),
215
215
    io:format("~-10w     records in table ~w~n", [length(Counters), Tab]),
216
 
    Fun = fun({Oid, Val}) when Val < 5 ->
 
216
    Fun = fun({_Oid, Val}) when Val < 5 ->
217
217
                  ignore;
218
218
             ({Oid, Val}) ->
219
219
                  io:format("~-10w *** records with key ~w~n", [Val, Oid])
221
221
    lists:foreach(Fun, Counters),
222
222
    display_size(State#state.size_tab, Tab),
223
223
    display(State, Tabs);
224
 
display(CounterTab, []) ->
 
224
display(_CounterTab, []) ->
225
225
    ok.
226
226
    
227
227
match_tab(T, Tab) ->