aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2021-01-02Update copyright yearsSergey Poznyakoff143
2020-12-24Fix the use of unprefixed dnl in configure.acSergey Poznyakoff1
2020-12-23Version 1.19v1.19Sergey Poznyakoff3
2020-12-23Update the docsSergey Poznyakoff9
* 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.
2020-12-23Update copyright yearsSergey Poznyakoff143
2020-12-23Remove duplicate global declarationsSergey Poznyakoff3
* src/gdbm_dump.c: Add missing I18N. * src/gdbm_load.c: Likewise. * src/parseopt.c (parseopt_program_doc) (parseopt_program_args): Remove duplicate declarations.
2020-10-09Implement tagged structure initializers.Sergey Poznyakoff6
* 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.
2020-10-08Bugfixes.Sergey Poznyakoff2
* 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.
2019-10-29Pre-read the memory mapped regions on systems that support itSergey Poznyakoff1
* src/mmap.c (GDBM_MMAP_FLAGS): Define to MAP_POPULATE or MAP_PREFAULT_READ, if available. (_gdbm_internal_remap): Use GDBM_MMAP_FLAGS.
2019-10-29Minor changesSergey Poznyakoff4
* src/gdbmconst.h: Don't redefine SIZE_T_MAX * src/gdbmtool.c: Likewise. Include <termios.h>, instead of <sys/termios.h> * configure.ac: Don't check for termios.h * tests/closerr.c: Minor fixes.
2019-04-08Update copyright yearsSergey Poznyakoff143
2019-04-08Preserve locking type during database reorganizationSergey Poznyakoff1
* src/recover.c (_gdbm_finish_transfer): Preserve locking type.
2018-11-27Fix typo in the manpage.Sergey Poznyakoff1
2018-10-27Version 1.18.1v1.18.1Sergey Poznyakoff2
2018-10-18Restore backward compatibility with older databasesSergey Poznyakoff1
* src/gdbmopen.c (validate_header): Silently accept databases with next_block pointing beyond end of file.
2018-10-18Attempt recovery in case of invalid next_block header fieldSergey Poznyakoff4
* src/gdbmopen.c (validate_header): Return GDBM_NEED_RECOVERY if next_block is invalid. (_gdbm_validate_header): New function. (gdbm_fd_open): Set need_recovery depending on return from validate_header. (gdbm_open): Bail out on invalid value of GDBM_OPENMASK bits. * src/proto.h (_gdbm_validate_header): New proto. * src/recover.c (check_db): Re-validate the header. * src/gdbmtool.c (export_handler): Fix option processing.
2018-08-31Various bugfixes.Sergey Poznyakoff12
* compat/dbmopen.c (ndbm_open_dir_file0): Ignore ENOENT. * src/falloc.c (push_avail_block): Free temporary storage no matter what return status. * src/gdbm.h.in (GDBM_FILE_TRUNCATE_ERROR): New error code. * src/gdbmdump.c (_gdbm_dump_ascii): Initialize rc. * src/gdbmerrno.c: Handle new error.code * src/gdbmload.c (gdbm_load_bdb_dump): Initialize rc * src/gdbmopen.c (_gdbm_ftruncate): New function. (gdbm_fd_open): Use _gdbm_ftruncate. Check its return. * src/gdbmseq.c (gdbm_firstkey): Initialize dsize * src/gdbmtool.c (command_generator): Check if cmd is NULL. (shouldn't happen, but anyways). * src/mmap.c (_gdbm_mapped_lseek): Check for vailidity of the 'whence' parameter. * src/systems.h (TRUNCATE): Remove macro. * src/util.c (vgetyn): Remove unnecessary assignment.
2018-08-21Version 1.18v1.18Sergey Poznyakoff2
2018-08-19Fix directory entry validation.Sergey Poznyakoff1
Bug reported by Miroslav Lichvar and Marek Skalick√Ĺ * src/bucket.c (gdbm_dir_entry_valid_p): Fix lower limit for the allowed bucket address. Initial allocation of second block for the directory can be eventually returned to the available list when the directory is expanded during bucket splitting.
2018-08-12BugfixSergey Poznyakoff3
* src/gdbmdump.c (_gdbm_dump_ascii): Clear the GDBM_ITEM_NOT_FOUND error. * src/gdbmexp.c (gdbm_export_to_file): Likewise. * NEWS: Update.
2018-08-03BugfixSergey Poznyakoff1
* src/gdbmopen.c (gdbm_avail_table_valid_p): Fix improper use of the GDBM_DEBUG macro.
2018-07-31BugfixSergey Poznyakoff1
* src/gdbmsync.c (gdbm_sync): Always return a meaningful value
2018-07-30Version 1.17v1.17Sergey Poznyakoff2
2018-07-02BugfixesSergey Poznyakoff2
* src/recover.c (backup_name): Fix memory overwrite. * src/gdbmtool.c (recover_handler): New option "force".
2018-07-01Change return value of gdbm_close and gdbm_syncSergey Poznyakoff20
* 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.
2018-06-27Version 1.16v1.16Sergey Poznyakoff3
2018-06-27Fix typoSergey Poznyakoff1
2018-06-27New gdbmtool variables: coalesce and centfreeSergey Poznyakoff3
The two boolean variables control the use of free block coalescing and central free block modes in newly opened databases.
2018-06-27Coalesce mode: take into account both left- and right-adjacent slots.Sergey Poznyakoff1
* src/falloc.c (avail_lookup): Remove the start parameter. (avail_move): Take pointer to the count of entries in av_table. Update the pointed to value after performing the move. All uses changed. (_gdbm_put_av_elem): Rewrite the "can_merge" loop.
2018-06-25Optimize operations on avail lists.Sergey Poznyakoff1
Use binary search for look-ups. * src/falloc.c (avail_lookup, avail_move): New functions. (get_elem): Use avail_lookup to search. (_gdbm_put_av_elem): Use avail_lookup and avail_move to handle the avail table. In coalesce mode, store the index of the greater than or equal entry to avoid extra lookup in case no suitable entry is found.
2018-06-23Bugfixes. Consistently use the coalesce_blocks flag.Sergey Poznyakoff3
* src/bucket.c (_gdbm_split_bucket): Take into account coalesce_blocks * src/falloc.c (_gdbm_put_av_elem): Change to void return. All uses changed. * src/proto.h: Likewise.
2018-06-23Fix the previous patchSergey Poznyakoff1
2018-06-23Silently restore sorting order of avail array when checking it.Sergey Poznyakoff2
* src/gdbmdefs.h (gdbm_avail_table_valid_p): Remove const qualifier from the AV parameter. * src/gdbmopen.c (gdbm_avail_table_valid_p): Don't insist on proper ordering of the array. Restore it if neccessary.
2018-06-23Maintain correct ordering of the avail table after coalescing.Sergey Poznyakoff2
* src/falloc.c (_gdbm_put_av_elem): Float the merged entry to its proper position to preserve the sorting order. * THANKS: Thanks Adam Sampson
2018-06-23Fix typoSergey Poznyakoff1
2018-06-16Version 1.5v1.15Sergey Poznyakoff8
* configure.ac: Version 1.5 * NEWS: Update. * src/Makefile.am (VI_CURRENT): Increment to 6 * src/bucket.c (_gdbm_get_bucket): Fix the upper limit for bucket_bits. * src/falloc.c (push_avail_block): Fill the allocated block with 0s.
2018-05-30More error checkingSergey Poznyakoff2
* src/bucket.c (_gdbm_get_bucket): Check if bucket_bits value is valid. * src/gdbmtool.c (_gdbm_print_avail_list): Reverse the sense of the conditional (fix regression).
2018-05-30Avoid unnecessary memory reallocations during cachingSergey Poznyakoff4
* src/findkey.c (_gdbm_read_entry): Reallocate cache_entry->ca_data.dptr only if necessary. * src/gdbmdefs.h (data_cache_elem): New member: dsize * src/gdbmdelete.c: Don't free cache_entry->ca_data.dptr * src/gdbmopen.c (_gdbm_init_cache): Initialize ca_data.dsize
2018-05-30Rewrite gdbm_file_write etc. as inline functions.Sergey Poznyakoff1
2018-05-30Fix the legacy operation (--disable-mmapped-io)Sergey Poznyakoff6
* src/mmap.c (_gdbm_file_extend): Move to ... * src/fullio.c: ... here * src/proto.h (_gdbm_file_extend): New proto. * src/gdbmopen.c (gdbm_fd_open): Make sure the file size equals header->next_block. * src/gdbmsetopt.c [!HAVE_MMAP]: Don't disable GDBM_GETFLAGS. * src/update.c (_gdbm_end_update): Make sure disk file ends on header->next_block.
2018-05-30Namespace cleanupSergey Poznyakoff14
Rename: __read to gdbm_file_read __write to gdbm_file_write __lseek to gdbm_file_seek __fsync to gdbm_file_sync
2018-05-30Drop debugging hooksSergey Poznyakoff10
The hooks were introduced as a temporary tool in de7834e9. They did their job and are not necessary any more.
2018-05-30gdbmtool: bugfixesSergey Poznyakoff1
* src/gdbmtool.c (print_bucket_begin): Check return value from _gdbm_get_bucket. (source_handler): Don't gtry to push NULL stream.
2018-05-30Fix memory leak in _gdbm_get_bucketSergey Poznyakoff3
2018-05-30Fix memory leaks in handling history (gdbmtool) and in gdbm_recoverSergey Poznyakoff3
2018-05-29Minor changesSergey Poznyakoff2
* src/gdbmtool.c: Reduce memory consuption in -random mode. Some minor bugfixes as well.
2018-05-28Improve num2wordSergey Poznyakoff1
* tests/num2word.c: New options: -revert and -random
2018-05-27Additional validation of avail_table.Sergey Poznyakoff9
Verify that avail_table is sorted by size and that each element's size falls within allowed range. * src/bucket.c (gdbm_get_bucket): Fix bucket validation. Validate bucket_avail. (_gdbm_split_bucket): Check return from _gdbm_free. * src/falloc.c (adjust_bucket_avail,_gdbm_free): Return error code. All uses updated. (pop_avail_block): Fix eventual memory leak. Use gdbm_avail_block_validate. * src/gdbmdefs.h (gdbm_avail_table_valid_p): Change signature. * src/gdbmopen.c (gdbm_avail_table_valid_p): Traverse the array verifying address and size of each element. (gdbm_avail_block_validate) (gdbm_bucket_avail_table_validate): New functions. (validate_header): Remove call to gdbm_avail_block_valid_p. Avail_block is validated later, after it's been loaded. Bail out if header->next_block does not equal the file size. (gdbm_fd_open): Validate avail_block. * src/gdbmstore.c (_gdbm_store): Check return from _gdbm_free. Avoid endless loop in case of inconsistent h_table. * src/gdbmtool.c (_gdbm_print_avail_list): Use gdbm_avail_block_validate. * src/proto.h: Update. * tests/gtload.c: Improve error diagnostics.
2018-05-26gdbmtool: quote special characters in command line inputSergey Poznyakoff1
2018-05-25configure: emit a notice if --enable-gdbmtool-debug is usedSergey Poznyakoff2

Return to:

Send suggestions and report system problems to the System administrator.