diff options
author | Dan Gudmundsson <[email protected]> | 2014-11-12 14:44:44 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-11-12 14:51:21 +0100 |
commit | dff52d0b26869caab886c82f71f0b11cbcdd33b1 (patch) | |
tree | f837ff1116837cd7be682ecbb890a8e3facfcdfa /lib/mnesia/test | |
parent | b3741f2b8e2ed9f370abb029160d1817497436e1 (diff) | |
download | otp-dff52d0b26869caab886c82f71f0b11cbcdd33b1.tar.gz otp-dff52d0b26869caab886c82f71f0b11cbcdd33b1.tar.bz2 otp-dff52d0b26869caab886c82f71f0b11cbcdd33b1.zip |
mnesia: Fix match_object bug
match_object returned wrong objects when matching on non key fields
and updates in the same transaction had been performed.
Diffstat (limited to 'lib/mnesia/test')
-rw-r--r-- | lib/mnesia/test/mnesia_isolation_test.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/mnesia/test/mnesia_isolation_test.erl b/lib/mnesia/test/mnesia_isolation_test.erl index d57f976d1f..8468472cf2 100644 --- a/lib/mnesia/test/mnesia_isolation_test.erl +++ b/lib/mnesia/test/mnesia_isolation_test.erl @@ -1584,7 +1584,8 @@ write_shadows(Config) when is_list(Config) -> ?match([RecA2], mnesia:read({Tab, a})), ?match([RecA2], mnesia:wread({Tab, a})), - ?match([RecA2], mnesia:match_object(PatA2)), %% delete shadow old but not new write - is the new value visable + ?match([], mnesia:match_object(PatA1)), %% delete shadow old but not new write + ?match([RecA2], mnesia:match_object(PatA2)), %% is the new value visable ?match([a], mnesia:all_keys(Tab)), ?match([RecA2], mnesia:index_match_object(PatA2, ValPos)), @@ -1643,6 +1644,7 @@ delete_shadows(Config) when is_list(Config) -> ?match([RecA2], mnesia:read({Tab, a})), ?match([RecA2], mnesia:wread({Tab, a})), + ?match([], mnesia:match_object(PatA1)), ?match([RecA2], mnesia:match_object(PatA2)), ?match([a], mnesia:all_keys(Tab)), ?match([RecA2], mnesia:index_match_object(PatA2, ValPos)), |