path: root/doc
authorSergey Poznyakoff <>2016-07-20 11:40:08 (GMT)
committer Sergey Poznyakoff <>2016-07-20 11:50:21 (GMT)
commitde7834e96602695db1cb6efd6238398b84d2ca60 (patch) (side-by-side diff)
tree2fc49853a76d68a8db11aab24017843102fd22a8 /doc
parentfbb0df69ca498a4fb4689a6d12c2f05e2cfaf175 (diff)
Introduce debug hooks.
* New option --enable-debug Print feature summary at the end of the run. * src/debug.c: New file. * src/ [GDBM_COND_DEBUG_ENABLE]: Build debug.o Define GDBM_DEBUG_ENABLE. * src/gdbmdefs.h [GDBM_DEBUG_ENABLE] (_gdbm_debug_hook_install) (_gdbm_debug_hook_remove,_gdbm_debug_hook_check) (_gdbm_debug_hook_val): New protos. (GDBM_DEBUG_HOOK, GDBM_DEBUG_OVERRIDE) (GDBM_DEBUG_ALLOC): New defines. * src/ (GDBM_RCVR_FORCE): New flag. * src/recover.c (gdbm_recover): Check database before attempting recovery, unless GDBM_RCVR_FORCE flag is set. * doc/gdbm.texi: Document GDBM_RCVR_FORCE * src/gdbmreorg.c (gdbm_reorganize): Use GDBM_RCVR_FORCE. * src/gdbmtool.c (main): Always allocate file_name. * src/bucket.c: Put GDBM_DEBUG_OVERRIDE and GDBM_DEBUG_ALLOC in critical places. * src/falloc.c: Likewise. * src/findkey.c: Likewise. * src/gdbmopen.c: Likewise. * src/gdbmstore.c: Likewise. * src/update.c: Likewise. * tests/ [GDBM_COND_DEBUG_ENABLE]: Define GDBM_DEBUG_ENABLE. * tests/gtload.c: New options -hook, -recover, -verbose, -backup, -max-failures, -max-failed-keys, and -max-failed-buckets. Attempt recovery after errors.
Diffstat (limited to 'doc') (more/less context) (ignore whitespace changes)
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/gdbm.texi b/doc/gdbm.texi
index 866a672..7f93046 100644
--- a/doc/gdbm.texi
+++ b/doc/gdbm.texi
@@ -1135,6 +1135,13 @@ The caller is responsible for freeing that memory when no longer needed.
@end deftypecv
@end deftypefn
+By default, @code{gdbm_recovery} first checks the database fo
+inconsistencies and attempts recovery only if some were found.
+The special flag bit @code{GDBM_RCVR_FORCE} instructs
+@code{gdbm_recovery} to omit this check and to force recovery
@node Options
@chapter Setting options
@cindex database options

Return to:

Send suggestions and report system problems to the System administrator.