[erlang-questions] Strange behaviour of ets

Maxim Treskin zerthurd@REDACTED
Wed Feb 27 13:01:21 CET 2008


Hello

I see some strange behaviour of ets interaction.
After I did an error in ets:select request, all following requests are
erroneous until, i.e. ets:new
It is my session:

--------------------------

(ie@REDACTED)89> ets:new(test, [public, named_table]).
test
(ie@REDACTED)90> ets:insert(test, {{as, 2}, 23}).
true
(ie@REDACTED)91> ets:insert(test, {{qwe, 5}, 756}).
true
(ie@REDACTED)92> ets:insert(test, {{xcv, 3}, 111}).
true
(ie@REDACTED)93> ets:select(test, [{{{'$1', '$2'}, '$3'}, [], ['$3']}]).
[111,756,23]
(ie@REDACTED)94>

All is OK

(ie@REDACTED)94> ets:select(qwe, [{{{'$1', '$2'}, '$3'}, [], ['$3']}]).
** exception error: bad argument
     in function  ets:select/2
        called as ets:select(qwe,[{{{'$1','$2'},'$3'},[],['$3']}])

Error

(ie@REDACTED)95> ets:select(test, [{{{'$1', '$2'}, '$3'}, [], ['$3']}]).
** exception error: bad argument
     in function  ets:select/2
        called as ets:select(test,[{{{'$1','$2'},'$3'},[],['$3']}])

The same request as in 93 line, error also

--------------------------

Why this error happens?


Thank you

-- 
Maxim Treskin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080227/4d042b6d/attachment.htm>


More information about the erlang-questions mailing list