[erlang-questions] Deleting rows in Mnesia

Håkan Mattsson <>
Wed Jul 21 10:33:38 CEST 2010

On Tue, Jul 20, 2010 at 6:57 PM, Thomas Schwarzkopf
<> wrote:
> Hi,
> when I try to delete a row in a Mnesia table like this:
> F = fun() -> mnesia:delete({sometable, somekey}) end.
> mnesia:transaction(F).
> returns
> {atomic, ok}
> even if somekey does not exist. Why is this?
> I would expect an aborted transaction like in the case of a non-existing
> tablename.

Access of a non-existing table is regarded as an error. It is very likely
that the application is not properly installed (forgot to create the table).

Whether a record with a given key exists or not at a given timepoint
is very application dependent. Mnesia does not bother.


More information about the erlang-questions mailing list