[Erlang Systems]

1 Mnesia Release Notes

This document describes the changes made to the Mnesia system from version to version. The intention of this document is to list all incompatibilities as well as all enhancements and bugfixes for every release of Mnesia. Each release of Mnesia thus constitutes one section in this document. The title of each section is the version number of Mnesia.

1.1 Mnesia 3.9.4

1.1.1 Improvements and new features

1.1.2 Fixed Bugs and malfunctions

1.1.3 Incompatibilities

None.

1.1.4 Known bugs and problems

None.

1.2 Mnesia 3.9.3

1.2.1 Improvements and new features

1.2.2 Fixed Bugs and malfunctions

1.2.3 Incompatibilities

None.

1.2.4 Known bugs and problems

None.

1.3 Mnesia 3.9.2

1.3.1 Improvements and new features

1.3.2 Fixed Bugs and malfunctions

1.3.3 Incompatibilities

None.

1.3.4 Known bugs and problems

None.

1.4 Mnesia 3.9.1

1.4.1 Improvements and new features

None

1.4.2 Fixed Bugs and malfunctions

1.4.3 Incompatibilities

None.

1.4.4 Known bugs and problems

None.

1.5 Mnesia 3.9

1.5.1 Improvements and new features

1.5.2 Fixed Bugs and malfunctions

1.5.3 Incompatibilities

1.5.4 Known bugs and problems

None.

1.6 Mnesia 3.8.6

1.6.1 Improvements and new features

None

1.6.2 Fixed Bugs and malfunctions

1.6.3 Incompatibilities

None.

1.6.4 Known bugs and problems

None.

1.7 Mnesia 3.8.5

1.7.1 Improvements and new features

None

1.7.2 Fixed Bugs and malfunctions

1.7.3 Incompatibilities

None.

1.7.4 Known bugs and problems

None.

1.8 Mnesia 3.8.4

1.8.1 Improvements and new features

None

1.8.2 Fixed Bugs and malfunctions

1.8.3 Incompatibilities

None.

1.8.4 Known bugs and problems

None.

1.9 Mnesia 3.8.3

1.9.1 Improvements and new features

1.9.2 Fixed Bugs and malfunctions

1.9.3 Incompatibilities

None.

1.9.4 Known bugs and problems

1.10 Mnesia 3.8.2

1.10.1 Improvements and new features

1.10.2 Fixed Bugs and malfunctions

1.10.3 Incompatibilities

None.

1.10.4 Known bugs and problems

None.

1.11 Mnesia 3.8.1

1.11.1 Improvements and new features

None

1.11.2 Fixed Bugs and malfunctions

1.11.3 Incompatibilities

None.

1.11.4 Known bugs and problems

None.

1.12 Mnesia 3.8

1.12.1 Improvements and new features

1.12.2 Fixed Bugs and malfunctions

1.12.3 Incompatibilities

1.12.4 Known bugs and problems

None.

1.13 Mnesia 3.7.2

1.13.1 Improvements and new features

1.13.2 Fixed Bugs and malfunctions

None

1.13.3 Incompatibilities

None.

1.13.4 Known bugs and problems

None.

1.14 Mnesia 3.7.1

1.14.1 Improvements and new features

None.

1.14.2 Fixed Bugs and malfunctions

1.14.3 Incompatibilities

None.

1.14.4 Known bugs and problems

None.

1.15 Mnesia 3.7

1.15.1 Improvements and new features

1.15.2 Fixed Bugs and malfunctions

1.15.3 Incompatibilities

Mnesia must be restarted on all nodes in order to cope with the following changes:

1.15.4 Known bugs and problems

The new concept of fragmented tables must be described in the Users Guide and Reference Manual.

1.16 Mnesia 3.6

1.16.1 Improvements and new features

1.16.2 Fixed Bugs and malfunctions

Yes.

1.16.3 Incompatibilities

None.

1.16.4 Known bugs and problems

None.

1.17 Mnesia 3.5.4

1.17.1 Improvements and new features

None.

1.17.2 Fixed Bugs and malfunctions

1.17.3 Incompatibilities

None.

1.17.4 Known bugs and problems

None.

1.18 Mnesia 3.5.3

1.18.1 Improvements and new features

None.

1.18.2 Fixed Bugs and malfunctions

1.18.3 Incompatibilities

None.

1.18.4 Known bugs and problems

None.

1.19 Mnesia 3.5.2

1.19.1 Improvements and new features

None.

1.19.2 Fixed Bugs and malfunctions

1.19.3 Incompatibilities

None.

1.19.4 Known bugs and problems

None.

1.20 Mnesia 3.5.1

1.20.1 Improvements and new features

None.

1.20.2 Fixed Bugs and malfunctions

1.20.3 Incompatibilities

None.

1.20.4 Known bugs and problems

None.

1.21 Mnesia 3.5

1.21.1 Improvements and new features

None.

1.21.2 Fixed Bugs and malfunctions

1.21.3 Incompatibilities

None.

1.21.4 Known bugs and problems

None.

1.22 Mnesia 3.4.1

1.22.1 Improvements and new features

1.22.2 Fixed Bugs and malfunctions

1.22.3 Incompatibilities

None.

1.22.4 Known bugs and problems

None.

1.23 Mnesia 3.4

1.23.1 Improvements and new features

1.23.1.1 Record name may differ from table name

From this release onwards, the record name of records stored in Mnesia may differ from the name of the table that they are stored in. In order to use this new feature the table property {record_name, Name} has been introduced. If this property is omitted when the table is created, the table name will be used as record name. For example, if two tables are created like this:

          TabDef = [{record_name, subscriber}]
          mnesia:create_table(my_subscriber, TabDef)
          mnesia:create_table(your_subscriber, TabDef)
        

it would be possible to store subscriber records in both of them:

          mnesia:write(my_subscriber, #subscriber{}, sticky_write)
          mnesia:write(your_subscriber, #subscriber{}, write)
        

In order to enable usage of this new support for record_name new functions have been added to the Mnesia API:

          mnesia:dirty_write(Tab, Record) 
          mnesia:dirty_delete(Tab, Key) 
          mnesia:dirty_delete_object(Tab, Record) 
          mnesia:dirty_update_counter(Tab, Key, Incr) 
          mnesia:dirty_read(Tab, Key)
          mnesia:dirty_match_object(Tab, Pattern)
          mnesia:dirty_index_match_object(Tab, Pattern, Attr) 
        
          mnesia:write(Tab, Record, LockKind) 
          mnesia:delete(Tab, Key, LockKind) 
          mnesia:delete_object(Tab, Record, LockKind) 
          mnesia:read(Tab, Key, LockKind) 
          mnesia:match_object(Tab, Pattern, LockKind) 
          mnesia:all_keys(Tab)
          mnesia:index_match_object(Tab, Pattern, Attr, LockKind)
          mnesia:index_read(Tab, SecondaryKey, Attr)

          LockKind ::= read | write | sticky_write | ...
        

The old corresponding functions still exists, but are merely a syntactic sugar for the new ones:

          mnesia:dirty_write(Record) ->
            Tab = element(1, Record),
            mnesia:dirty_write(Tab, Record).
  
          mnesia:dirty_delete({Tab, Key}) ->
            mnesia:dirty_delete(Tab, Key).
  
          mnesia:dirty_delete_object(Record) ->
            Tab = element(1, Record),
            mnesia:dirty_delete_object(Tab, Record) 
  
          mnesia:dirty_update_counter({Tab, Key}, Incr) ->
            mnesia:dirty_update_counter(Tab, Key, Incr).
  
          mnesia:dirty_read({Tab, Key}) ->
            Tab = element(1, Record),
            mnesia:dirty_read(Tab, Key).
  
          mnesia:dirty_match_object(Pattern) ->
            Tab = element(1, Pattern),
            mnesia:dirty_match_object(Tab, Pattern).
  
          mnesia:dirty_index_match_object(Pattern, Attr) 
            Tab = element(1, Pattern),
            mnesia:dirty_index_match_object(Tab, Pattern, Attr).
          
          mnesia:write(Record) ->
            Tab = element(1, Record),
            mnesia:write(Tab, Record, write).
  
          mnesia:s_write(Record) ->
            Tab = element(1, Record),
            mnesia:write(Tab, Record, sticky_write).
  
          mnesia:delete({Tab, Key}) ->
            mnesia:delete(Tab, Key, write).
  
          mnesia:s_delete({Tab, Key}) ->
            mnesia:delete(Tab, Key, sticky_write).
  
          mnesia:delete_object(Record) ->
            Tab = element(1, Record),
            mnesia:delete_object(Tab, Record, write).
  
          mnesia:s_delete_object(Record) ->
            Tab = element(1, Record),
            mnesia:delete_object(Tab, Record. sticky_write).
  
          mnesia:read({Tab, Key}) ->
            mnesia:read(Tab, Key, read).
  
          mnesia:wread({Tab, Key}) ->
            mnesia:read(Tab, Key, write).
  
          mnesia:match_object(Pattern) ->
            Tab = element(1, Pattern),
            mnesia:match_object(Tab, Pattern, read).
  
          mnesia:index_match_object(Pattern, Attr) ->
            Tab = element(1, Pattern),
            mnesia:index_match_object(Tab, Pattern, Attr, read).
          

The earlier function semantics remain unchanged.

Use the function mnesia:table_info(Tab, record_name) to determine the record name of a table.

If the name of all tables equals the record name that the table hosts everything is backward compatible. But if the new record_name feature is used this may affect old existing applications:

1.23.1.2 New function mnesia:lock/2

A new locking function has been introduced:

          mnesia:lock(LockItem, LockKind)

          LockItem ::= {table, Tab} | {global, Item, Nodes} | ...
          LockKind ::= read | write | ...
          

The old table locking functions still exists, but are now merely a syntactic sugar for the new functions:

          mnesia:read_lock_table(Tab) ->
            mnesia:lock({table, Tab}, read).

          mnesia:write_lock_table(Tab)
            mnesia:lock({table, Tab}, write).
        
1.23.1.3 New function mnesia:activity/2,3,4

In the Mnesia API there are some functions whose semantics depends of the execution context:

          mnesia:lock(LockItem, LockKind)
          mnesia:write(Tab, Rec, LockKind)
          mnesia:delete(Tab, Key, LockKind)
          mnesia:delete_object(Tab, Rec, LockKind)
          mnesia:read(Tab, Key, LockKind)
          mnesia:match_object(Tab, Pat, LockKind)
          mnesia:all_keys(Tab)
          mnesia:index_match_object(Tab, Pat, Attr, LockKind)
          mnesia:index_read(Tab, SecondaryKey, Attr)
          mnesia:table_info(Tab, InfoItem)
        

if these functions are executed within a mnesia:transaction/1,2,3, locks are acquired, atomic commit is ensured etc. If the same functions are executed within the context of mnesia:async_dirty/1,2, mnesia:sync_dirty/1,2 or mnesia:ets/1,2 their semantics are different. Although this is not entirely new, new functions have been introduced:

          mnesia:activity(ActivityKind, Fun)
          mnesia:activity(ActivityKind, Fun, Args)
          mnesia:activity(ActivityKind, Fun, Module)
          mnesia:activity(ActivityKind, Fun, Args, Module)

          ActivityKind ::= transaction | 
                           {transaction, Retries} |
                           async_dirty |
                           sync_dirty |
                           ets
          

Depending on the ActivityKind argument, the evaluation context will be the same as with the functions:
mnesia:transaction,
mnesia:async_dirty,
mnesia:sync_dirty and
mnesia:ets respectively. The Module argument provides the name of a callback module that will implement the mnesia_access behavior. It must export the functions:

          lock(ActivityId, Opaque, LockItem, LockKind)
          write(ActivityId, Opaque, Tab, Rec, LockKind)
          delete(ActivityId, Opaque, Tab, Key, LockKind)
          delete_object(ActivityId, Opaque, Tab, Rec), LockKind
          read(ActivityId, Opaque, Tab, Key, LockKind)
          match_object(ActivityId, Opaque, Tab, Pat, LockKind)
          all_keys(ActivityId, Opaque, Tab, LockKind)
          index_match_object(ActivityId, Opaque, Tab, Pat, Attr, LockKind)
          index_read(ActivityId, Opaque, Tab, SecondaryKey, Attr, LockKind)
          table_info(ActivityId, Opaque, Tab, InfoItem)
          
          ActivityId ::=

            A record which represents the identity of the enclosing Mnesia
            activity. The first field (obtained with element(1, ActivityId)
            contains an atom which may be interpreted as the type of the
            activity: 'ets', 'async_dirty', 'sync_dirty' or 'tid'. 'tid'
            means that the activity is a transaction.

          Opaque ::=
        
            An opaque data structure which is internal to Mnesia.
        

mnesia and mnesia_frag are examples of callback modules. By default the mnesia module is used as callback module for accesses within "Mnesia activities".
For example invoke the function mnesia:read(Tab, Key, LockKind), and the corresponding Module:read(ActivityId, Opaque, Tab, Key, LockKind) will be invoked to perform the job (or it will pass it on to mnesia:read(ActivityId, Opaque, Tab, Key, LockKind)).

A customized callback module may be used for several purposes, such as providing triggers, integrity constraints, run time statistics, or virtual tables. The callback module does not have to access real Mnesia tables, it is a free agent provided the callback interface is fulfilled.

The context sensitive function mnesia:table_info/2 may be used to provide virtual information about a table. This function enables the user to perform Mnemosyne queries within an activity context with a customized callback module. By providing table indices information and other Mnemosyne requirements, Mnemosyne can be used as an efficient generic query language for access of virtual tables.

Please, read the "mnesia_access callback behavior" in Appendix C for a code example from the mnesia_frag module.

1.23.1.4 New configuration parameter access_module

The new configuration parameter access_module has been added. It defaults to the atom mnesia, but may be set to any module that fulfills the callback interface with mnesia_access behavior.

The mnesia:activity functions will use the access_module as a callback module if it not is explicitly overridden by the Module argument.

Use mnesia:system_info(access_module) to determine the actual access_module setting.

1.23.2 Fixed Bugs and malfunctions

1.23.3 Incompatibilities

None as long as all tables only host records with the same name as the table name. Please, read the chapter Improvements and new features about the potential inconsistencies.

1.23.4 Known bugs and problems

None.

1.24 Mnesia 3.3

1.24.1 Improvements and new features

1.24.2 Fixed Bugs and malfunctions

1.24.3 Incompatibilities

None.

1.24.4 Known bugs and problems

No new problems or bugs. See previous release notes.

1.25 Mnesia 3.2

1.25.1 Improvements and new features

1.25.2 Fixed Bugs and malfunctions

1.25.3 Incompatibilities

None.

1.25.4 Known bugs and problems

No new problems or bugs. See previous release notes.

1.26 Mnesia 3.1.1

This release is a minor release and the release notes describes the difference between version 3.1.1 and version 3.1 of Mnesia.

1.26.1 Improvements and new features

None.

1.26.2 Fixed Bugs and malfunctions

1.26.3 Incompatibilities

None.

1.26.4 Known bugs and problems

No new problems or bugs. See previous release notes.

1.27 Mnesia 3.1

1.27.1 Improvements and new features

1.27.2 Fixed Bugs and malfunctions

1.27.3 Incompatibilities

None.

1.27.4 Known bugs and problems

No new problems or bugs. See previous release notes.

1.28 Mnesia 3.0

This release is a major release and the release notes describes the difference between version 3.0 and version 2.3. 3.0 is classified as major release due to the issues described in the chapter about incompatibilities described below.

1.28.1 Improvements and new features

1.28.2 Fixed Bugs and malfunctions

No serious bugs or malfunctions.

1.28.3 Incompatibilities

Mnesia 3.0 is primary developed for OTP R4, but is still backward compatible with the OTP R3 platform.

The internal database format on disc has been made more future safe. It has also been altered in order to cope with the newly introduced features. The special upgrade procedure is as follows:

Mnemosyne has been made into an own separate application. The new application is called mnemosyne. Please, read its release notes. This application split implies a few incompatibilities:

1.28.4 Known bugs and problems

None of these are newly introduced.


Copyright © 1991-2001 Ericsson Utvecklings AB