anchor.diff:      foldr(DB, Fun, Acc, {LBr, End, Previous, ']'}, MaxNum);
   foldr(DB, Fun, Acc, {'[', End, Start, ']'}, MaxNum) ->
       case mnesia:transaction(fun()-> mnesia:read(DB, Start) end) of
  -      {atom, []} ->
  +      {atomic, []} ->
               {atomic, Previous} = mnesia:transaction(fun()-> mnesia:prev(DB, Start) end),
               foldr(DB, Fun, Acc, {'[', End, Previous, ']'}, MaxNum);
  -      {atom, [_Entry]} ->
  +      {atomic, [_Entry]} ->
               foldr_iter(DB, Fun, Acc, {'[', End, Start, ']'}, MaxNum)
       end.
   
  
positive.code: %%      A new database is created
  -spec open(DBName::nonempty_string()) -> db().
  open(DBName) ->
      log:log(warn, "~p: open/1 is not supported by ets, calling new/1 instead",
              [self()]),
      new(DBName).
  
  %% @doc Closes and deletes the DB named DBName
  -spec close(DBName::db()) -> true.
  close(DBName) ->
      ?TRACE("close:~nDB_name:~p~n",[DBName]),
      mnesia:transaction(fun()-> mnesia:delete_table(DBName)end).
  
  %% @doc Saves arbitrary tuple Entry or list of tuples Entries
  %%      in DB DBName and returns the new DB.
  
negative.code:     {atomic, Next} = mnesia:transaction(fun()-> mnesia:next(DB, Start) end),
      foldl_iter(DB, Fun, Fun(Start, Acc), {'[', Next, End, ']'}, MaxNum - 1).
  
  %% @doc Is equivalent to foldr(Fun, Acc0, DB).
  -spec foldr(db(), fun((Key::key(), AccIn::A) -> AccOut::A), Acc0::A) -> Acc1::A.
  foldr(DB, Fun, Acc) ->
      {atomic, First} = mnesia:transaction(fun()-> mnesia:first(DB) end),
      {atomic, Last} = mnesia:transaction(fun()-> mnesia:last(DB) end),
      foldr(DB, Fun, Acc, {'[', First, Last, ']'}, mnesia:table_info(DB, size)).
  
  %% @doc Is equivalent to foldr(DB, Fun, Acc0, Interval, get_load(DB)).
  -spec foldr(db(), fun((Key::key(), AccIn::A) -> AccOut::A), Acc0::A, db_backend_beh:interval()) -> Acc1::A.
  foldr(DB, Fun, Acc, Interval) ->
      foldr(DB, Fun, Acc, Interval, mnesia:table_info(DB, size)).
  
  %% @doc Behaves like foldl/5 with the difference that it starts at the end of
  %%      Interval and iterates towards the start of Interval.
  