diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-06 12:25:00 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-06 12:25:00 +0100 |
| commit | 370d8cb9e31eebfe6dde90623230bcbbc577f9ec (patch) | |
| tree | 2e8662a7eea99a883ff55a0fbc1c2d5f736747ac | |
| parent | 314b2a80bd83fe1a03ed6dbb5f9a4c6d3a2f5be4 (diff) | |
| download | rabbitmq-server-git-370d8cb9e31eebfe6dde90623230bcbbc577f9ec.tar.gz | |
tweak
| -rw-r--r-- | src/rabbit_mnesia.erl | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl index dbb270a1fa..b575540d3d 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} |
