Bug in mnesia:dirty_update_counter

Vance Shipley vances@REDACTED
Wed Mar 9 16:08:59 CET 2005


If only mnesia:dirty_update_counter/3 behaved the same 
as ets:update_counter/3:

	mnesia:dirty_update_counter(Tab, Key, Incr) ->

	ets:update_counter(Tab, Key, {Pos,Incr,Threshold,SetValue}) ->
	ets:update_counter(Tab, Key, {Pos,Incr}) ->
	ets:update_counter(Tab, Key, Incr) ->

With the ets version you can have, for example, a modulo 128 counter with:

	ets:update_counter(Tab, Key, {Pos, 1, 127, 0}).


	-Vance



More information about the erlang-questions mailing list