1
%% This tests the presence of possible races due to an mnesia:dirty_read/
2
%% mnesia:dirty_write combination. It takes into account the argument types
5
-module(mnesia_dirty_read_one_write_two).
8
-record(employee, {emp_no,
17
[E] = mnesia:dirty_read({employee, Eno}),
18
Salary = E#employee.salary + Raise,
19
New = E#employee{salary = Salary},
20
mnesia:dirty_write(employee, New).