summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2010-08-06 12:25:00 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2010-08-06 12:25:00 +0100
commitf4f473d01e3feb3c8b9b37006738798c88c671e1 (patch)
tree2e8662a7eea99a883ff55a0fbc1c2d5f736747ac
parent2da241c04ed395a4506377bf4f1769b890227cc6 (diff)
downloadrabbitmq-server-f4f473d01e3feb3c8b9b37006738798c88c671e1.tar.gz
tweak
-rw-r--r--src/rabbit_mnesia.erl23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index dbb270a1..b575540d 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -236,18 +236,17 @@ check_schema_integrity() ->
TabDefs = table_definitions(),
Tables = mnesia:system_info(tables),
case [Failure || Tab <- table_names(),
- begin
- {_, TabDef} = proplists:lookup(Tab, TabDefs),
- {_, ExpAttrs} = proplists:lookup(attributes, TabDef),
- case lists:member(Tab, Tables) of
- false -> Failure = {table_missing, Tab},
- true;
- true -> Attrs = mnesia:table_info(
- Tab, attributes),
- Failure = {table_attributes_mismatch, Tab,
- ExpAttrs, Attrs},
- Attrs /= ExpAttrs
- end
+ case lists:member(Tab, Tables) of
+ false ->
+ Failure = {table_missing, Tab},
+ true;
+ true ->
+ {_, TabDef} = proplists:lookup(Tab, TabDefs),
+ {_, EAttrs} = proplists:lookup(attributes, TabDef),
+ Attrs = mnesia:table_info(Tab, attributes),
+ Failure = {table_attributes_mismatch, Tab,
+ EAttrs, Attrs},
+ Attrs /= EAttrs
end] of
[] -> ok;
Ps -> {error, Ps}