diff options
author | Dan Gudmundsson <[email protected]> | 2018-08-13 15:24:03 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2018-08-13 15:25:25 +0200 |
commit | 4fc61aa178faa80290356a63d8e38d93697b9669 (patch) | |
tree | f98854f6e215a760fbe2040451dd16d019485831 /lib/mnesia/test | |
parent | 8442906fca8f52757e473e82c72c9b04d98ad996 (diff) | |
parent | e052249e6ce4da0c6a022bb8da0186cd678e1054 (diff) | |
download | otp-4fc61aa178faa80290356a63d8e38d93697b9669.tar.gz otp-4fc61aa178faa80290356a63d8e38d93697b9669.tar.bz2 otp-4fc61aa178faa80290356a63d8e38d93697b9669.zip |
Merge remote-tracking branch 'upstream/pr/1858' into maint
* upstream/pr/1858:
Fix delete_object and write convergence in transaction.
OTP-15231
Diffstat (limited to 'lib/mnesia/test')
-rw-r--r-- | lib/mnesia/test/mnesia_isolation_test.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/mnesia/test/mnesia_isolation_test.erl b/lib/mnesia/test/mnesia_isolation_test.erl index b2eea2390b..49bcec14af 100644 --- a/lib/mnesia/test/mnesia_isolation_test.erl +++ b/lib/mnesia/test/mnesia_isolation_test.erl @@ -1563,7 +1563,8 @@ trans_update_visible_inside_trans(Config) when is_list(Config) -> ?match({atomic, ok}, mnesia:create_table([{name, Tab}, {ram_copies, [Node1]}])), ValPos = 3, - RecA = {Tab, a, 1}, + RecA = {Tab, a, 1}, + RecA2 = {Tab, a, 2}, PatA = {Tab, '$1', 1}, RecB = {Tab, b, 3}, PatB = {Tab, '$1', 3}, @@ -1598,6 +1599,14 @@ trans_update_visible_inside_trans(Config) when is_list(Config) -> ?match([], mnesia:index_read(Tab, 3, ValPos)), %% delete_object + ?match(ok, mnesia:delete_object(RecA2)), + ?match([RecA], mnesia:read({Tab, a})), + ?match([RecA], mnesia:wread({Tab, a})), + ?match([RecA], mnesia:match_object(PatA)), + ?match([a], mnesia:all_keys(Tab)), + ?match([RecA], mnesia:index_match_object(PatA, ValPos)), + ?match([RecA], mnesia:index_read(Tab, 1, ValPos)), + ?match(ok, mnesia:delete_object(RecA)), ?match([], mnesia:read({Tab, a})), ?match([], mnesia:wread({Tab, a})), |