Opened 3 years ago

Closed 3 years ago

#4296 closed task (fixed)

gdbm-1.15

Reported by: bdubbs@… Owned by: lfs-book
Priority: normal Milestone: 8.3
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description

New minor version.

Change History (2)

comment:1 by bdubbs@…, 3 years ago

Version 1.15 - 2018-06-15

  • Extensive database consistency checking

GDBM tries to detect inconsistencies in input database files as early as possible. When an inconcistency is detected, a helpful diagnostics is returned and the database is marked as needing recovery. From this moment on, any GDBM function trying to access the database will immediately return error code (instead of eventually segfaulting as previous versions did). In order to reconstruct the database and return it to healthy state, the gdbm_recover function should be used.

  • Improved error checking
  • Removed gdbm-1.8.3 compatibility layer
  • Commands can be given to gdbmtool in the command line

The syntax is:

gdbmtool DBNAME COMMAND [ARGS...]

Multiple commands are separated by semicolon (take care to escape it), e.g.:

gdbmtool t.db count\; avail

  • Fixed data conversion bugs in storing structured keys or content
  • New member in the gdbm_recovery structure: duplicate_keys.

Upon return from gdbm_recover, this member holds the number of keys that has not been recovered, because the same key had already been stored in the database. The actual number of stored keys is thus recovered_keys - duplicate_keys.

  • New error codes.
  • GDBM_BAD_BUCKET "Malformed bucket header"
  • GDBM_BAD_HEADER "Malformed database file header"
  • GDBM_BAD_AVAIL "Malformed avail_block"
  • GDBM_BAD_HASH_TABLE "Malformed hash table"
  • GDBM_BAD_DIR_ENTRY "Invalid directory entry"

comment:2 by bdubbs@…, 3 years ago

Resolution: fixed
Status: newclosed

Fixed at revision 11426.

Note: See TracTickets for help on using tickets.