summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2009-01-22 11:51:37 -0500
committerSimo Sorce <idra@samba.org>2009-01-22 11:54:51 -0500
commit3942e53357146c9c5419313efc4c91b85f7e508b (patch)
treebb839fb523177bce4fe3655ebb2c5050bf333ef4 /source4/lib/ldb
parent031f24694197ab2c90418c5a5285a2932b71e998 (diff)
downloadsamba-3942e53357146c9c5419313efc4c91b85f7e508b.tar.gz
samba-3942e53357146c9c5419313efc4c91b85f7e508b.tar.bz2
samba-3942e53357146c9c5419313efc4c91b85f7e508b.zip
Do not start a transaction this way.
Because we still want to commit any changes that successfully apply we never want to do a global cancel, and because of how transaction nesting works that means we never cancel any "transaction" at the single modify operation level. Let each operation start its own transaction so that the transaction is properly canceled if any error is returned and half committed operations (though plugins failing) are properly reverted on a per operation basis.
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/tools/ldbmodify.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/source4/lib/ldb/tools/ldbmodify.c b/source4/lib/ldb/tools/ldbmodify.c
index d73937cea4..6e355a10cf 100644
--- a/source4/lib/ldb/tools/ldbmodify.c
+++ b/source4/lib/ldb/tools/ldbmodify.c
@@ -93,11 +93,6 @@ int main(int argc, const char **argv)
options = ldb_cmdline_process(ldb, argc, argv, usage);
- if (ldb_transaction_start(ldb) != 0) {
- printf("Failed to start transaction: %s\n", ldb_errstring(ldb));
- exit(1);
- }
-
if (options->argc == 0) {
ret = process_file(ldb, stdin, &count);
} else {
@@ -113,11 +108,6 @@ int main(int argc, const char **argv)
}
}
- if (count != 0 && ldb_transaction_commit(ldb) != 0) {
- printf("Failed to commit transaction: %s\n", ldb_errstring(ldb));
- exit(1);
- }
-
talloc_free(ldb);
printf("Modified %d records with %d failures\n", count, failures);