Age | Commit message (Collapse) | Author | Files |
|
|
|
* tools/gdbm_load.c (main): Imply the owner login group if owner name
is followed by a :, and the current login group otherwise.
* doc/gdbm.texi: Document changes.
|
|
Fixes https://puszcza.gnu.org.ua/bugs/index.php?573
* tools/gdbm_load.c: New option: --update (-U)
The --replace (-r) option is valid only if used together with
--update.
* NEWS: Document changes.
* doc/gdbm.texi: Document changes.
|
|
* doc/gdbm.texi (Errors): Update @itemize list.
|
|
|
|
|
|
* src/cachetree.c: Remove.
* src/Makefile.am: Remove cachetree.c
* doc/gdbm.texi: Document the changes.
* src/bucket.c (cache_tab_lookup_slot)
(cache_tab_resize): New function.
(cache_elem_new): Initialize ca_coll.
(cache_elem_free, cache_lookup)
(_gdbm_cache_init,_gdbm_cache_free): Rewrite with hash-based cache lookup.
(_gdbm_fetch_data): Remove unused function.
* src/gdbm.h.in (GDBM_GETDBFORMAT, GDBM_GETDIRDEPTH)
(GDBM_GETBUCKETSIZE, GDBM_GETCACHEAUTO, GDBM_SETCACHEAUTO): New option codes.
* src/gdbmdefs.h (cache_node): Remove.
(cache_elem): Remove ca_node. Add ca_coll (collision resolution pointer).
(gdbm_file_info): New members: cache_auto, cache_bits, cache.
* src/gdbmopen.c (gdbm_fd_open): Change cache initialization.
* src/gdbmsetopt.c (GDBM_GETDBFORMAT,GDBM_GETDIRDEPTH)
(GDBM_GETBUCKETSIZE,GDBM_GETCACHEAUTO)
(GDBM_SETCACHEAUTO): Implement new options.
(setopt_gdbm_getflags): Reflect the state of GDBM_CLOEXEC and GDBM_NUMSYNC.
* src/proto.h (_gdbm_fetch_data,_gdbm_cache_tree_alloc)
(_gdbm_cache_tree_destroy,_gdbm_cache_tree_delete)
(_gdbm_cache_tree_lookup): Remove protos.
* src/recover.c (_gdbm_finish_transfer): Restore original cache settings.
* tests/Makefile.am: Add new test.
* tests/testsuite.at: Likewise.
* tests/gtcacheopt.c: New file.
* tests/setopt02.at: New test case.
|
|
|
|
* src/recover.c (_gdbm_finish_transfer): Remove call to _gdbmsync_done.
* doc/gdbm.texi: Reflect the changes.
|
|
|
|
* Makefile.am: Use plain git log to format the ChangeLog.
* git2chg.awk: Remove.
* NOTE-WARNING: Update.
* README: Likewise.
* README-alpha: Likewise.
* README-hacking: Likewise.
* doc/gdbm.3: Likewise.
* doc/gdbm.texi
|
|
|
|
* doc/gdbm.texi: Document the perror command.
* src/gdbmshell.c: New command: perror.
(run_command): In timing mode, print also user and system CPU times.
Print traces on stderr.
* src/gdbmtool.c: New options: -t (--trace) and -T (--timing).
|
|
|
|
* NEWS: Document changes.
* doc/gdbm.texi: Document new variables.
|
|
|
|
|
|
* doc/gdbm.texi: Update.
* src/gdbm.h.in (GDBM_ILLEGAL_DATA): Rename to GDBM_MALFORMED_DATA.
(GDBM_OPT_ILLEGAL): Rename to GDBM_OPT_BADVAL.
All uses changed.
Old constants retained for backward compatibility.
|
|
|
|
|
|
* src/gdbmload.c (_gdbm_str2fmt): New function.
* src/proto.h (_gdbm_str2fmt): New proto.
* src/gdbmtool.c (open_format): New global variable.
(opendb): Add open_format to gdbm_open flags
* src/gdbmtool.h (open_format): New extern.
* src/var.c: Handle the "format" variable.
* doc/gdbm.texi: Document the changes.
|
|
|
|
* doc/gdbm.texi: Document manual crash recovery procedure.
Document the gdbmtool "shell" command.
Fix chapter headings (remove final point).
Replace headings with sections.
* src/gdbmopen.c (gdbm_header_avail): Remove const qualifier from
1st argument
* src/proto.h (gdbm_file_sync): New proto.
* src/gdbmsync.c (gdbm_file_sync): Moved from proto.h.
(gdbm_sync): Call _gdbm_end_update to be sure
all changes are written to disk.
* src/gdbmtool.c: Implement the shell command.
(command_lookup): Fix name prefix comparison.
* src/gram.y: New token T_SHELL.
* src/lex.l: Sub-lexers for shell arguments.
|
|
* src/gdbmtool.c: New command: "snapshot"
* doc/gdbm.texi: Document the snapshot command (gdbmtool).
* doc/gdbmtool.1: Likewise.
* src/gdbmsync.c: Fix a comment.
|
|
* doc/Makefile.am: Export htmlxref.cnf
* doc/htmlxref.cnf: New file.
* doc/gdbm.texi: Improve crash-tolerance descriptions.
* src/gdbmsync.c (stat_snapshot): Set errno = EACCES if access bits
of the snapshot stat are wrong.
(gdbm_latest_snapshot): Don't touch ret if returning
GDBM_SNAPSHOT_SUSPICIOUS.
|
|
|
|
* doc/gdbm.texi: Document GDBM_SNAPSHOT_BAD
* src/gdbm.h.in (GDBM_SNAPSHOT_BAD): New constant.
* src/gdbmsync.c (fsync_to_root): Rewrite. Use pointer
to traverse the pathname in the reverse direction. Fsync
the root directory as well.
(gdbm_failure_atomic): Create both snapshots in user write-only mode.
(stat_snapshot): Fail if the file is neither readable nor writable.
(gdbm_latest_snapshot): Fail if neither file is readable.
Fix selection of the snapshot by mtime: prefer the latest one.
[!GDBM_FAILURE_ATOMIC]: Provide the placeholder for
gdbm_latest_snapshot.
|
|
|
|
|
|
|
|
The commit 4fb2326a4a introduced pre-reading of memory mapped
regions. While speeding up searches, it has a negative impact
on write operatons, since every remapping effectively re-reads
the entire database. See https://github.com/Perl/perl5/issues/18884
for details.
* NEWS: Document changes.
* doc/gdbm.texi: Document the GDBM_PREREAD flag.
* src/gdbm.h.in (GDBM_PREREAD): New flag.
* src/gdbmdefs.h (gdbm_file_info): New member: mmap_preread.
* src/gdbmopen.c (gdbm_fd_open): Set mmap_preread if requested.
* src/gdbmsetopt.c (setopt_gdbm_getflags): Report GDBM_PREREAD
flag, if dbf->mmap_preread is set.
* src/mmap.c (_gdbm_internal_remap): Use pre-fault reading only
if dbf->mmap_preread is set.
|
|
This provides for the optimal performance.
Additional GDBM_XVERIFY flag can be used when opening the database
to request extended database verification (entire avail stack will be
checked).
* src/bucket.c (cache_lookup): Handle cache_size == GDBM_CACHE_AUTO.
(_gdbm_cache_init): Likewise.
* src/gdbm.h.in (GDBM_XVERIFY): New flag to gdbm_open.
(GDBM_CACHE_AUTO): New constant.
Define error constants within enum.
Fix definition of GDBM_BAD_HASH_ENTRY.
* src/gdbmclose.c: Fix misleading comment.
* src/gdbmconst.h: Define DEFAULT_CACHESIZE to be GDBM_CACHE_AUTO.
* src/gdbmopen.c (gdbm_fd_open): Call gdbm_avail_verify if
the GDBM_XVERIFY flag is set.
* doc/gdbm.texi: Update.
* doc/gdbm.3: Update.
|
|
|
|
|
|
* doc/Makefile.am: Use gendocs.pl to generate web version of the
manual.
* doc/gdbm.texi: Update.
* doc/gendocs.pl: New file.
* doc/otherdoc.texi.in: New file.
* doc/.gitignore: Ignore otherdoc.texi.
* doc/webdoc.init: New file.
* doc/gendocs.sh: Remove.
* doc/gendocs_template: Remove.
* doc/html.init: Remove.
|
|
|
|
* NEWS: Document changes.
* doc/gdbm.texi: Document changes.
* src/datconv.c (datum_scan_tag): Implement tagged structure
initialization.
* src/gdbmtool.c (kvlist_free): Made extern.
(kvlist_find): New function.
* src/gdbmtool.h (kvlist_find, kvlist_free)
(dsegm_list_find): New protos.
(dsegm_free_list): Rename to dsegm_list_free. All uses changed.
* src/gram.y: Forbid duplicate tags in kvlist.
|
|
* doc/gdbm.texi: Fix the description of a sample content structure.
* src/datconv.c (datum_scan_notag): Proceed to the next kvpair only
for segments of the FDEF_FLD type.
|
|
* src/gdbmcount.c (gdbm_bucket_count): New function.
* src/gdbm.h.in (gdbm_bucket_count): New proto.
* doc/gdbm.texi: Document gdbm_bucket_count.
* src/gdbmtool.c (bucket_count): Reimplement via gdbm_bucket_count.
|
|
|
|
|
|
|
|
* src/gdbm.h.in (gdbm_close, gdbm_sync): Return int
(GDBM_FILE_CLOSE_ERROR, GDBM_FILE_SYNC_ERROR): New error codes.
* src/gdbmclose.c (gdbm_close): Return 0 on success, -1 on failure.
Set gdbm_errno and errno.
* src/gdbmsync.c (gdbm_sync): Likewise.
* src/gdbmerrno.c: Handle new error codes.
* src/mmap.c (_gdbm_mapped_sync): Set gdbm_errno.
* src/proto.h (gdbm_file_sync): Set gdbm_errno.
* doc/gdbm.3: Document changes.
* doc/gdbm.texi: Document changes.
* NEWS: Document changes.
* configure.ac: Set patchlevel.
* tests/Makefile.am: Add new test.
* tests/testsuite.at: Add new test.
* tests/closerr.at: New test case.
* tests/closerr.c: New test program.
* tests/gtdel.c: Check gdbm_close return.
* tests/gtdump.c: Likewise.
* tests/gtfetch.c: Likewise.
* tests/gtload.c: Likewise.
* tests/gtopt.c: Likewise.
* tests/gtrecover.c: Likewise.
|
|
|
|
|
|
The two boolean variables control the use of free block coalescing and
central free block modes in newly opened databases.
|
|
* src/input-std.c: Bugfix
* doc/gdbm.texi: Document changes.
* README: Update.
* configure.ac: New option --enable-gdbmtool-debug.
* src/Makefile.am: Conditionally augment AM_YFLAGS and
AM_LFLAGS with options that enable debugging.
* src/gdbmtool.c: Conditionally enable --lex-trace and
--gram-trace options.
* src/gram.y: Likewise.
* src/lex.l: Likewise.
* tests/Makefile.am: Remove architecure-dependent tests.
* tests/testsuite.at: Likewise.
|
|
Commands can be supplied to gdbmtool in three ways:
1. From a file, using the --file (-f) option:
gdbmtool -f comfile
2. From the command line, if first argument is the database name:
gdbmtool test.db count \; fetch mykey \; avail
Note the use of semicolon to delimit commands.
3. From the interactive shell, if neither of the above is used.
* src/Makefile.am: Add new sources.
* src/gdbmtool.c: Use new stream functions for input.
* src/gdbmtool.h (setsource): Remove proto.
(instream_t): New data type.
(instream_name, instream_read)
(instream_close, instream_interactive)
(instream_eq): New functions.
(instream_stdin_create)
(instream_argv_create)
(instream_file_create)
(interactive, input_context_push): New protos.
* src/gram.y: Accept ; in place of newline.
* src/input-argv.c: New file.
* src/input-file.c: New file.
* src/input-rl.c: Rewrite to provide instream_t API.
* src/input-std.c: Likewise.
* src/lex.l: Rewrite.
* tests/.gitignore: Update.
* tests/Makefile.am: Add new tests. Incorporate
DejaGNU tests.
* tests/config/default.exp: New file.
* tests/gdbmtool/base.exp: New file.
* tests/gdbmtool00.at: New file.
* tests/gdbmtool01.at: New file.
* tests/gdbmtool02.at: New file.
* tests/testsuite.at: Include new tests.
|
|
* configure.ac: Remove gdbm-1.8.3 compatibility layer.
Version 1.14.90
* Makefile.am (ACLOCAL_AMFLAGS): Remove deprecated variable.
(MAYBE_EXPORT): Remove variable and conditional.
* NEWS: Update.
* NOTE-WARNING: Update.
* README: Update.
* doc/gdbm.texi: Update.
* export/.gitignore: Remove.
* export/Makefile.am: Remove.
* export/export.c: Remove.
|
|
|