Revert "TODO: s4:ldb: use transaction for ldbmodify"
authorStefan Metzmacher <metze@samba.org>
Mon, 5 Jul 2010 15:30:40 +0000 (17:30 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 5 Jul 2010 16:00:23 +0000 (18:00 +0200)
This reverts commit ff150c6eefc51a7445ef5121429d8edc90cfce01.

source4/lib/ldb/tools/ldbmodify.c

index 8badcefbae903b3ebf3f60dfa023fea636583c1c..ecbdadfd65446bdb776d4990766076538a0c01ae 100644 (file)
@@ -100,11 +100,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 {
@@ -121,15 +116,6 @@ int main(int argc, const char **argv)
                }
        }
 
-       if (count != 0) {
-               if (ldb_transaction_commit(ldb) != 0) {
-                       printf("Failed to commit transaction: %s\n", ldb_errstring(ldb));
-                       exit(1);
-               }
-       } else {
-               ldb_transaction_cancel(ldb);
-       }
-
        talloc_free(mem_ctx);
 
        printf("Modified %d records with %d failures\n", count, failures);