summaryrefslogtreecommitdiffstats
path: root/lib/tdb/tools
Commit message (Collapse)AuthorAgeFilesLines
* tdb/toos: allow transactions with TDB_MUTEX_LOCKINGStefan Metzmacher2014-12-191-1/+0
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=11004 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* tdb:tools: fix a compiler warningStefan Metzmacher2014-09-161-4/+4
| | | | | | | | | ../../tdb/tools/tdbtool.c: In function ‘do_command’: ../../tdb/tools/tdbtool.c:717: error: declaration of ‘count’ shadows a global declaration ../../tdb/tools/tdbtool.c:597: error: shadowed declaration is here Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tdbtorture: print details when run with -n 1David Disseldorp2014-08-181-4/+4
| | | | | | | | | | | | | Currently tdbtorture prints the test details (processes, loops, etc.) from the first forked child process. When run with -n 1 (one process), the test is run from within the parent and no details are printed. This change ensures that they are. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Aug 18 13:26:32 CEST 2014 on sn-devel-104
* tdb: add "freelist_size" sub-command to tdbtoolMichael Adam2014-06-261-0/+15
| | | | | | | | | With the new code, this has the side effect of merging adjacent records in the freelist if the database is not read-only. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb/tools: Allow tdbtool to r/o open mutexed tdbsVolker Lendecke2014-05-221-1/+45
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/tools: add -m option to tdbtortureVolker Lendecke2014-05-221-4/+25
| | | | | | | | This allows tdbtorture to run with mutexes. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/tools: explicitly use TDB_NOLOCK in tdbdumpVolker Lendecke2014-05-221-1/+9
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/tools: add -l option to tdbtoolVolker Lendecke2014-05-221-2/+16
| | | | | | | | This opens the tdb with TDB_NOLOCK. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/tools: add -l option to tdbbackupVolker Lendecke2014-05-221-5/+13
| | | | | | | | This opens the tdb with TDB_NOLOCK. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/tools: avoid const warnings in tdbdump.cStefan Metzmacher2014-04-021-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tdb: Fix CID 1034959 Uninitialized scalar variableVolker Lendecke2013-07-221-1/+1
| | | | | | | | | log_ctx.log_private was used uninitialized. Not a real bug here, as tdb_log does not access it, but tdb_open_ex still moves around uninitialized data. So this would show up in valgrind as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb: Fix CID 1034960 Uninitialized scalar variableVolker Lendecke2013-07-221-1/+1
| | | | | | | | | log_ctx.log_private was used uninitialized. Not a real bug here, as tdb_log does not access it, but tdb_open_ex still moves around uninitialized data. So this would show up in valgrind as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Fix bug 10025 - Lack of Sanity Checking in calls to malloc()/calloc().Bill Parker2013-07-171-0/+8
| | | | | | | | | | | | | In reviewing various files in Samba-4.0.7, I found a number of instances where malloc()/calloc() were called without the checking the return value for a value of NULL, which would indicate failure. (NB. The changes needed to ccan, iniparser, popt and heimdal will be reported upstream, not patched inside Samba). Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Source <idra@samba.org>
* tdb: Fix blank line endingsVolker Lendecke2013-03-265-46/+45
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tdb: Don't segfault if tdb_open_ex for check failedVolker Lendecke2013-02-191-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Remove some unused variables.Jeremy Allison2013-01-191-3/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tdb: Fix \n in error messagesVolker Lendecke2013-01-071-2/+2
| | | | Reviewed-by: Rusty Russell <rusty@samba.org>
* tdb: add -e option to tdbdump (and docment it).Rusty Russell2012-10-041-3/+22
| | | | | | | | | | This allows for an emergency best-effort dump. It's a little better than strings(1). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Thu Oct 4 03:16:06 CEST 2012 on sn-devel-104
* tdb: tdbdump should log errors, and fail in that case.Rusty Russell2012-10-041-2/+38
| | | | | | | Dumping a corrupt database should not exit silently with 0 status! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: remove unused debug_fprintf() macro that breaks the buildStefan Metzmacher2012-06-141-2/+0
| | | | | | The IRIX compiler doesn't support '...' in a macro. metze
* Add "repack" command to tdbtool.Ira Cooper2012-01-071-0/+7
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Jan 7 02:18:41 CET 2012 on sn-devel-104
* Remove unused variable.Jeremy Allison2011-11-241-1/+0
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Nov 24 00:17:41 CET 2011 on sn-devel-104
* Fix a bunch of "warning: variable ‘XXXX’ set but not used ↵Jeremy Allison2011-11-211-3/+1
| | | | | | | [-Wunused-but-set-variable]" warnings from the new gcc. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Nov 21 23:39:08 CET 2011 on sn-devel-104
* tdb: remove 'EOF' print from tdbrestoreAndrew Tridgell2011-07-211-1/+0
| | | | | | the EOF message is pointless, and makes for noisy scripts Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* tdb_store: check returns for 0, not -1.Rusty Russell2011-06-202-4/+4
| | | | | | | | TDB2 returns a negative error number on failure. This is compatible if we always check for != 0 instead of == -1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb_backup: avoid transaction on backup file, use lockallSimo Sorce2011-04-191-8/+13
| | | | | | | | Transactions have the side effect of generating bigger files. By removing the transaction files get as much as 30% smaller. Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Tue Apr 19 23:34:37 CEST 2011 on sn-devel-104
* tdb: rename convert_string() to tdb_convert_string()Andrew Tridgell2011-03-251-5/+5
| | | | this prevents a conflict with the convert_string() in samba
* tdbrestore: Update to GPLv3+, remove old FSF address.Jelmer Vernooij2011-01-061-3/+2
|
* tdb: tdb_summary() support.Rusty Russell2010-12-291-5/+7
| | | | | Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Wed Dec 29 10:12:05 CET 2010 on sn-devel-104
* tdb:tdbtorture: use TEST_DATA_PREFIX for filesStefan Metzmacher2010-12-241-8/+30
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Dec 24 18:17:53 CET 2010 on sn-devel-104
* tdb:tdbtest: use TEST_DATA_PREFIX for filesStefan Metzmacher2010-12-241-3/+28
| | | | metze
* tdb:tdbstore.c - remove an useless '\'Matthias Dieter Wallnöfer2010-11-271-1/+1
| | | | Discovered by a warning of the Tru64 host on the buildfarm.
* tdb: add restoreVolker Lendecke2010-09-231-0/+226
| | | | Based on an idea by Simon McVittie, largely rewritten
* subunit: Support formatting compatible with upstream subunit, for consistency.Jelmer Vernooij2010-04-111-1/+1
| | | | | | Upstream subunit makes a ":" after commands optional, so I've fixed any places where we might trigger commands accidently. I've filed a bug about this in subunit.
* tdb: Fix bug 7248, avoid the nanosleep dependencyVolker Lendecke2010-03-221-4/+4
|
* tdb: add -k option to tdbtortureRusty Russell2010-02-241-57/+142
| | | | | | | | | | | | | | To test the case of death of a process during transaction commit, add a -k (kill random) option to tdbtorture. The easiest way to do this is to make every worker a child (unless there's only one child), which is why this patch is bigger than you might expect. Using -k without -t (always transactions) you expect corruption, though it doesn't happen every time. With -t, we currently get corruption but the next patch fixes that. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdbtool: avoid using c++ reserved words.Günther Deschner2009-12-171-2/+2
| | | | Guenther
* tdb tools: Mostly cosmetic adaptionsMatthias Dieter Wallnöfer2009-11-202-8/+9
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* lib/tdb: make tdbtool use tdb_check() for "check" commandRusty Russell2009-10-221-14/+30
| | | | | | | Also, set logging function so we get more informative messages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb: add -t (always use transactions) option to tdbtortureRusty Russell2009-10-221-12/+29
| | | | | | | This means you can kill it at any time and expect no corruption. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: fixed the intermittent failure of tdbtorture in the build farmAndrew Tridgell2009-10-201-2/+5
| | | | | | | | There was a race condition that caused the torture.tdb to be left in a state that needed recovery. The torture code thought that any message from the tdb code was an error, so the "recovered" message, which is a TDB_DEBUG_TRACE message, marked the run as being an error when it isn't.
* tdb:tdbtool: fix indentation.Michael Adam2009-09-211-178/+177
| | | | Michael
* tdb:tdbtool: add transaction_start/_commit/_cancel commands.Michael Adam2009-09-211-0/+21
| | | | | | So one can perform tdbtool operations protected by transactions. Michael
* tdb:tdbtool: add the "speed" command to the help text.Michael Adam2009-09-211-0/+1
| | | | Michael
* lib/tdb/tools/tdbtorture.c: fixed memory leak.Slava Semushin2009-06-061-0/+2
| | | | | Found by cppcheck: [lib/tdb/tools/tdbtorture.c:326]: (error) Memory leak: pids
* fixed tdbbackup to give tdb error messagesAndrew Tridgell2009-05-281-7/+31
|
* tdb: Fix some recently introduced warnings in tdbtoolTim Prouty2009-05-271-6/+6
|
* added some more speed tests to tdbtoolAndrew Tridgell2009-05-261-6/+59
| | | | | | | This adds 3 simple speed tests to tdbtool, for transaction store, store and fetch. On my laptop this shows transactions costing about 10ms
* added basic testing of tdb_transaction_prepare_commit() in tdbtortureAndrew Tridgell2009-03-311-0/+6
|
* Fix all warnings in source3 with gcc4.3.Jeremy Allison2008-12-311-1/+3
| | | | Jeremy.