[erlang-questions] Some mnesia oddity

Ben Hood <>
Tue Oct 7 09:58:16 CEST 2008


On Tue, Oct 7, 2008 at 7:30 AM, Dan Gudmundsson <> wrote:
> No it doesn't, see the first mail in this thread, if it does in some cases
> it is a bug too, is shouldn't work.

Good to know that this is not the intended behavior, even if it does
seem to work in a variety of cases. This clears up the mystery of what
this is not documented in the mnesia guide.

> That's a part of the bug above, you shouldn't see the deleted records,
> but then since you are not suppose to be able to delete them with the
> wildcard
> '_'.

I converted the test to iterate over the table with
mnesia:match_object/1 and then remove each element mnesia:delete/1 and
then the results of this were visible within the same transaction.

So this is consistent with the fact that you are not supposed to be
able to use wildcards with delete_object.

> I will probably disallow '_' and '$[1-n]' in mnesia:delete_object.

Thanks for the heads up. I will remove all usages of wildcards in
mnesia:delete_object/1 calls in our code.



More information about the erlang-questions mailing list