fix already_exists
This commit is contained in:
parent
2dd6d160f3
commit
11bdcf1017
|
@ -91,6 +91,7 @@ create_table(Table, Attrs) ->
|
||||||
case mnesia:create_table(Table, Attrs) of
|
case mnesia:create_table(Table, Attrs) of
|
||||||
{atomic, ok} -> ok;
|
{atomic, ok} -> ok;
|
||||||
{aborted, {already_exists, Table}} -> ok;
|
{aborted, {already_exists, Table}} -> ok;
|
||||||
|
{aborted, {already_exists, Table, _}} -> ok;
|
||||||
Error -> Error
|
Error -> Error
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -107,6 +108,7 @@ copy_tables() ->
|
||||||
copy_table(Table) ->
|
copy_table(Table) ->
|
||||||
case mnesia:add_table_copy(Table, node(), ram_copies) of
|
case mnesia:add_table_copy(Table, node(), ram_copies) of
|
||||||
{atomic, ok} -> ok;
|
{atomic, ok} -> ok;
|
||||||
|
{aborted, {already_exists, Table}} -> ok;
|
||||||
{aborted, {already_exists, Table, _Node}} -> ok;
|
{aborted, {already_exists, Table, _Node}} -> ok;
|
||||||
{aborted, Error} -> Error
|
{aborted, Error} -> Error
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Reference in New Issue