From 3339aabf37dc65fd3fa66482764fc9c533d65933 Mon Sep 17 00:00:00 2001
From: Dan Gudmundsson
Date: Wed, 6 May 2015 13:33:33 +0200
Subject: mnesia: dirty error messages did not behave as documented
The docs express that exit({aborted, Reason}) are called when
an error occur.
---
lib/mnesia/src/mnesia.erl | 10 +++-------
lib/mnesia/src/mnesia_lib.erl | 2 +-
lib/mnesia/test/mnesia_evil_coverage_test.erl | 6 +++---
3 files changed, 7 insertions(+), 11 deletions(-)
(limited to 'lib/mnesia')
diff --git a/lib/mnesia/src/mnesia.erl b/lib/mnesia/src/mnesia.erl
index f501a4485b..b9c2fd915c 100644
--- a/lib/mnesia/src/mnesia.erl
+++ b/lib/mnesia/src/mnesia.erl
@@ -306,6 +306,8 @@ ms() ->
-spec abort(_) -> no_return().
+abort(Reason = {aborted, _}) ->
+ exit(Reason);
abort(Reason) ->
exit({aborted, Reason}).
@@ -1626,13 +1628,7 @@ dirty_read(Oid) ->
dirty_read(Tab, Key)
when is_atom(Tab), Tab /= schema ->
-%% case catch ?ets_lookup(Tab, Key) of
-%% {'EXIT', _} ->
- %% Bad luck, we have to perform a real lookup
- dirty_rpc(Tab, mnesia_lib, db_get, [Tab, Key]);
-%% Val ->
-%% Val
-%% end;
+ dirty_rpc(Tab, mnesia_lib, db_get, [Tab, Key]);
dirty_read(Tab, _Key) ->
abort({bad_type, Tab}).
diff --git a/lib/mnesia/src/mnesia_lib.erl b/lib/mnesia/src/mnesia_lib.erl
index 7bd207f816..fc7362a31d 100644
--- a/lib/mnesia/src/mnesia_lib.erl
+++ b/lib/mnesia/src/mnesia_lib.erl
@@ -411,7 +411,7 @@ pr_other(Var) ->
verbose("~p (~p) val(mnesia_gvar, ~w) -> ~p ~n",
[self(), process_info(self(), registered_name),
Var, Why]),
- exit(Why).
+ mnesia:abort(Why).
%% Some functions for list valued variables
add(Var, Val) ->
diff --git a/lib/mnesia/test/mnesia_evil_coverage_test.erl b/lib/mnesia/test/mnesia_evil_coverage_test.erl
index 2d1623b6ca..430c1f1d84 100644
--- a/lib/mnesia/test/mnesia_evil_coverage_test.erl
+++ b/lib/mnesia/test/mnesia_evil_coverage_test.erl
@@ -1338,11 +1338,11 @@ user_properties(Config) when is_list(Config) ->
?match([], mnesia:table_info(Tab2, user_properties)),
?match([], mnesia:table_info(Tab3, user_properties)),
- ?match({'EXIT', {no_exists, {Tab1, user_property, PropKey}}},
+ ?match({'EXIT', {aborted, {no_exists, {Tab1, user_property, PropKey}}}},
mnesia:read_table_property(Tab1, PropKey)),
- ?match({'EXIT', {no_exists, {Tab2, user_property, PropKey}}},
+ ?match({'EXIT', {aborted, {no_exists, {Tab2, user_property, PropKey}}}},
mnesia:read_table_property(Tab2, PropKey)),
- ?match({'EXIT', {no_exists, {Tab3, user_property, PropKey}}},
+ ?match({'EXIT', {aborted, {no_exists, {Tab3, user_property, PropKey}}}},
mnesia:read_table_property(Tab3, PropKey)),
?match({atomic, ok}, mnesia:write_table_property(Tab1, Prop)),
--
cgit v1.2.3
From e09dd66dc4d89c62ddfd8c19791f9678d5d787c6 Mon Sep 17 00:00:00 2001
From: Erlang/OTP
Date: Tue, 12 May 2015 18:18:55 +0200
Subject: Prepare release
---
lib/mnesia/doc/src/notes.xml | 32 +++++++++++++++++++++++++++++++-
lib/mnesia/vsn.mk | 2 +-
2 files changed, 32 insertions(+), 2 deletions(-)
(limited to 'lib/mnesia')
diff --git a/lib/mnesia/doc/src/notes.xml b/lib/mnesia/doc/src/notes.xml
index dc98efbff3..7f6ff1e655 100644
--- a/lib/mnesia/doc/src/notes.xml
+++ b/lib/mnesia/doc/src/notes.xml
@@ -38,7 +38,37 @@
thus constitutes one section in this document. The title of each
section is the version number of Mnesia.
- Mnesia 4.12.5
+ Mnesia 4.13
+
+ Fixed Bugs and Malfunctions
+
+ -
+
+ Mnesia's dirty functions did not always exit with
+ {aborted, Reason} as documented when an error
+ occurred.
+
+ Own Id: OTP-12714
+
+
+
+
+
+ Improvements and New Features
+
+ -
+
+ Make Mnesia DCD dump behavior at start up optional, when
+ turned off mnesia loads large disc_copies tables faster.
+
+ Own Id: OTP-12481
+
+
+
+
+
+
+Mnesia 4.12.5
Fixed Bugs and Malfunctions
diff --git a/lib/mnesia/vsn.mk b/lib/mnesia/vsn.mk
index b23339e408..79dd495c4b 100644
--- a/lib/mnesia/vsn.mk
+++ b/lib/mnesia/vsn.mk
@@ -1 +1 @@
-MNESIA_VSN = 4.12.5
+MNESIA_VSN = 4.13
--
cgit v1.2.3
From 9a81b28598fadc44bf506354c9227e41aac786f6 Mon Sep 17 00:00:00 2001
From: Henrik Nord
Date: Wed, 13 May 2015 09:40:16 +0200
Subject: Revert "Prepare release"
This reverts commit e09dd66dc4d89c62ddfd8c19791f9678d5d787c6.
---
lib/mnesia/doc/src/notes.xml | 32 +-------------------------------
lib/mnesia/vsn.mk | 2 +-
2 files changed, 2 insertions(+), 32 deletions(-)
(limited to 'lib/mnesia')
diff --git a/lib/mnesia/doc/src/notes.xml b/lib/mnesia/doc/src/notes.xml
index 7f6ff1e655..dc98efbff3 100644
--- a/lib/mnesia/doc/src/notes.xml
+++ b/lib/mnesia/doc/src/notes.xml
@@ -38,37 +38,7 @@
thus constitutes one section in this document. The title of each
section is the version number of Mnesia.
- Mnesia 4.13
-
- Fixed Bugs and Malfunctions
-
- -
-
- Mnesia's dirty functions did not always exit with
- {aborted, Reason} as documented when an error
- occurred.
-
- Own Id: OTP-12714
-
-
-
-
-
- Improvements and New Features
-
- -
-
- Make Mnesia DCD dump behavior at start up optional, when
- turned off mnesia loads large disc_copies tables faster.
-
- Own Id: OTP-12481
-
-
-
-
-
-
-Mnesia 4.12.5
+ Mnesia 4.12.5
Fixed Bugs and Malfunctions
diff --git a/lib/mnesia/vsn.mk b/lib/mnesia/vsn.mk
index 79dd495c4b..b23339e408 100644
--- a/lib/mnesia/vsn.mk
+++ b/lib/mnesia/vsn.mk
@@ -1 +1 @@
-MNESIA_VSN = 4.13
+MNESIA_VSN = 4.12.5
--
cgit v1.2.3