Berkeley DB Reference Guide: Access Methods

Berkeley DB Reference Guide: Access Methods

Record length (re_len, DB_FIXEDLEN)

The Recno access method can be used to store both variable and fixed-length data items. By default, the data items are expected to be variable length. If the DB_FIXEDLEN flag is set in the DB_INFO structure during the db_open call to open the database, the data items are expected to be fixed-length.

Any record read from the backing source file or otherwise stored in the database that is shorter than the expected length will automatically be padded with the re_pad character.