Bug with ets? Or feature?

Jérémie Lumbroso <>
Sun Apr 16 23:00:51 CEST 2006


The following Erlang session demonstrates something I've found:

29> ets:new(tmp, [set, public]).
30> ets:insert(17, {this, is, a, test}).
31> ets:lookup(17, this).
32> [] = ets:lookup(17, this).

=ERROR REPORT==== 16-Apr-2006::22:57:50 ===
Error in process <0.70.0> with exit value:

** exited: {{badmatch,[{this,is,a,test}]},[{erl_eval,expr,3}]} **
33> ets:lookup(17, this).

=ERROR REPORT==== 16-Apr-2006::22:57:52 ===
Error in process <0.76.0> with exit value:

** exited: {badarg,[{ets,lookup,[17,this]},
                    {shell,eval_loop,3}]} **

It seems the bad match (I know it was bad), destroyed the table 17, somehow,
as it does not appear in ets:i() anymore after that first error.

I'm pretty certain that this is normal, but I do not see where it is
documented—and I'm reporting on the off-chance that it might be a bug.


Jérémie Lumbroso
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060416/f250f786/attachment.html>

More information about the erlang-questions mailing list