Version 1.23 is available for download.
New in this version:
** GDBM_GETDBFORMAT - Get the current database format.
** GDBM_GETDIRDEPTH - Get the database directory depth.
** GDBM_GETBUCKETSIZE - Get maximum number of keys per bucket.
** GDBM_GETCACHEAUTO - Get the status of the automatic cache adjustment.
** GDBM_SETCACHEAUTO - Enable or disable automatic cache adjustment.
Version 1.22 is available for download. This version includes several bugfixes and improves the documentation. The list of bugfixes follows:
Version 1.21 is available for download. This version introduces an important new feature: Crash tolerance, brought to gdbm by Terence Kelly.
Version 1.20 is available for download.
Changes in this version:
The bucket cache support has been rewritten from scratch. The new code provides for significant speed up of search operations.
Pre-reading of the memory mapper regions, introduced in version 1.19 can be advantageous only when doing intensive look-ups on a read-only
database. It degrades performance otherwise, especially if doing multiple inserts. Therefore, this version introduces a new flag
to gdbm_open: GDBM_PREREAD. When given, it enables pre-reading of memory mapped regions. (details)
Version 1.19 is available for download. New in this version:
Version 1.18.1 is available for download (see also list of mirrors).
This is an intermediate release that restores backward compatibility with databases created by gdbm 1.8 (and some later versions, if built with mmapped I/O disabled). See Debian bug 910911 for details.
Version 1.17 is available for download.
Fixes bug#399. See also the improved version of the GDBM_File Perl module.
Version 1.16 has been released.
This version improves free space management and fixes a long-standing bug discovered recently due to introduction of strict database consistency checks.
GDBM version 1.15 is available for download. Important changes in this release:
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.
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
== 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
The following new error codes are introduced:
Version 1.14 is available for download. This is a bug-fix release. A list of important changes follows:
This fixes two longstanding bugs: (1) when allocating database file header blocks, the unused memory is filled with zeroes; (2) when expanding
a mmapped memory area, the added extent is filled with zeroes.
GDBM version 1.13 is available for download.
New in this version:
If the requested key was not found, these functions return datum with dptr pointing to NULL and set gdbm_errno to GDBM_ITEM_NOT_FOUND (in prior releases, gdbm_errno was set to GDBM_NO_ERROR).
If an error occurred, dptr is set to NULL, and gdbm_errno to the error code.
In any case gdbm_errno is guaranteed to have meaningful value upon return.
In previous versions of GDBM, fatal errors (such as write error while storing the key/data pair or bucket) caused immediate termination of the program via call to exit(3). This is no longer the case.
Starting from this version, if a fatal error occurrs while modifying the database file, that database is marked as needing recovery and gdbm_errno is set to GDBM_NEED_RECOVERY. Calls to any GDBM functions, except gdbm_recover, will then return immediately with the same error code.
The function gdbm_recover examines the database file and fixes eventual inconsistencies. Upon successful return it clears the error state and makes the database operational again.
For backward compatibility, the fatal_func argument to gdbm_open is retained and its functionality is not changed. If it is not NULL, the new error handling procedures are disabled, the function it points to will be called upon fatal errors. When it returns, exit(1) will be called.
In addition to gdbm_error global variable, the most recent error state is saved in the GDBM_FILE structure. This facilitates error handling when operating multiple GDBM databases simultaneously.
The following new functions are implemented for manipulating error states:
Returns the code of the most recent error that occurred in the given database.
Returns the value the system errno variable had when the most recent error occurred. This provides additional information for such error codes as GDBM_FILE_SEEK_ERROR, GDBM_FILE_WRITE_ERROR and the like.
Clears the error state associated with the database file.
Returns textual description of the error.
Returns true if the database file needs recovery.
When creating a new database, the gdbm_open function will adjust the requested block size so that the block can hold integer number of directory entries. Thus, the resulting block size can be bigger than the requested one. If the GDBM_BSEXACT flag is set, this behavior is suppressed and gdbm_open will try to force exactly the requested block size. If unable to do so, it will set the gdbm_errno variable to GDBM_BLOCK_SIZE_ERROR and return NULL.
Returns the block size in bytes. E.g.
int size;
if (gdbm_setopt (dbf, GDBM_GETBLOCKSIZE, &size, sizeof size))
abort ();
...
Alternative function for opening a GDBM database. The fd argument is
the file descriptor of the database file obtained by a call to
open(2), creat(2) or similar functions. The descriptor is not dup'ed, and
will be closed when the returned GDBM_FILE is closed. Use dup(2) if
that is not desirable.
Copy meta-information (ownership and file permissions) from src to dst.
The gdbmtool utility now offers the usual line-editing facilities (if the package has been compiled with GNU Readline.
If the last entered command was "next", hitting the "Enter" key repeats it without arguments.
The magic file suitable for use with the file(1) command is distributed with the package. Its name is src/gdbm.magic.
It is not installed by default, as its installation location differs considerably between various distributions.
GDBM repository switched to Git. For details, please see:
GNU DBM version 1.12 is available for download
This is mostly a bug-fix release. Noteworthy new feature:
When used with --enable-libgdbm-compat, this variable points to the directory where the headers file dbm.h and ndbm.h will be installed.
Use this variable to avoid conflicts with already installed headers. E.g.:
./configure --enable-libgdbm-compat COMPATINCLUDEDIR=/usr/include/gdbm
Version 1.10.90 (alpha) of GDBM is available for download at ftp://alpha.gnu.org/gnu/gdbm/gdbm-1.10.90.tar.gz
Version 1.10 is available for download. This is the first GDBM release that is fully internationalized. Currently available are the following localizations: Finnish, German, Japanese, Polish and Ukrainian.
Other changes in this release:
GDBM Version 1.9.1 is available for download.
Right after releasing 1.9, a bug was spotted which affected compilation with the newer GCC. This version fixes this bug, as well as a minor dependency problem in the testsuite Makefile.
Since the changes are small, a diff to the previous version is also distributed.
The version 1.9 of GNU dbm is available for download from ftp://ftp.gnu.org/gnu/gdbm and (after a proper delay) from its mirrors worldwide. New in this version:
To speed up I/O operations, mmap(2) is used when available.
It can be disabled at compile time using --disable-memory-mapped-io and at run time by giving GDBM_NOMMAP flag to gdbm_open.
These changes fix several long-standing bugs in ndbm compatibility code, which made it impossible to
use GDBM with Sendmail and Postfix. Now that they are fixed, GDBM can be used with these MTAs.
Neither ndbm nor dbm functions lock their files.
This bug was reported, in particular, in https://bugzilla.redhat.com/show_bug.cgi?id=663932
Instead of linking pag to dir as previous versions did, GDBM now
creates a separate dir file. Consequently, dbm_pagfno and dbm_dirfno return different file descriptors.
When opening an existing database as a writer, GDBM determines if dir is linked to pag, and if so breaks the link and creates a new dir file. When such a database is opened in a read-only mode, GDBM does not attempt to alter the link.
New options are implemented for use with gdbm_setopt function. In particular, a set of options is provided for retrieving various database parameters, such as the file name, memory mapping status, etc.
Testgdbm is an interactive tool for manipulating GDBM database files. It allows you to view or update existing databases, export them to the portable flat file format and to create new database files.