table_info on non-local mnesia table

View: New views
1 Messages — Rating Filter:   Alert me  

table_info on non-local mnesia table

by Ulf Wiger-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I recently came across the problem that calling
mnesia:table_info(Tab, size) will return 0 if the table
does not reside locally. This behaviour is not obvious from
the documentation, nor is the remedy:

Calling

mnesia:activity(Type, fun() ->
                             mnesia:table_info(Tab,size)
                       end, mnesia_frag),

will always return the correct value, even if the table
isn't fragmented.

I consider this a bug. Mnesia should detect that the table
is remote and act accordingly, rather than returning a bogus
value.

BR,
Ulf W
--
Ulf Wiger
CTO, Erlang Training & Consulting Ltd
http://www.erlang-consulting.com

________________________________________________________________
erlang-bugs mailing list. See http://www.erlang.org/faq.html
erlang-bugs (at) erlang.org