dets:traverse/2 in R8B

Vance Shipley <>
Fri Nov 9 02:42:10 CET 2001


I found this behaviour changed from previous releases.  It
would appear to be a bug.  It even says it is. :)

	-Vance

Erlang (BEAM) emulator version 5.1 [source] [hipe] [threads:0]

Eshell V5.1  (abort with ^G)
1> dets:open_file(foo, []).
{ok,foo}
2> dets:insert(foo, [{1,abc,10},{2,def,11},{3,ghi,12},{4,jkl,13}]).
ok
3> dets:traverse(foo, fun(X) -> {continue, X} end).
[{3,ghi,12},{1,abc,10},{4,jkl,13},{2,def,11}]
4> dets:close(foo).
ok
5> dets:open_file(foo, [{access, read}]).
{ok,foo}
6> dets:traverse(foo, fun(X) -> {continue, X} end).

=ERROR REPORT==== 8-Nov-2001::16:42:23 ===
** dets: Bug was found when accessing table foo,
** dets: operation was {match,<<>>,[{'_',[],['$_']}],default} and reply was
'EXIT'.

=ERROR REPORT==== 8-Nov-2001::16:42:23 ===
Error in process <0.25.0> with exit value:
{{{case_clause,{badarg,[{erlang,size,[false]},{dets_utils,all,1},{dets,init_
scan,2},{dets,chunk_begin,3},{dets,fselect,4},{dets,apply_op,4},{dets,open_f
ile_loop,2}]}},[{dets,do_trav,4},{dets,do_traverse,4},{erl_eval,expr,...
** exited: {{{case_clause,{badarg,[{erlang,size,[false]},
                                   {dets_utils,all,1},
                                   {dets,init_scan,2},
                                   {dets,chunk_begin,3},
                                   {dets,fselect,4},
                                   {dets,apply_op,4},
                                   {dets,open_file_loop,2}]}},
             [{dets,do_trav,4},
              {dets,do_traverse,4},
              {erl_eval,expr,3},
              {erl_eval,exprs,4},
              {shell,eval_loop,2}]},
            [{dets,do_traverse,4},
             {erl_eval,expr,3},
             {erl_eval,exprs,4},
             {shell,eval_loop,2}]} **
7>






More information about the erlang-questions mailing list