summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap_ctdb.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-03-10 10:17:05 +0100
committerVolker Lendecke <vl@samba.org>2008-03-10 21:08:44 +0100
commit541b8dec4e21e0a88ccc0d85bc01433b66eb3588 (patch)
treec1c9ac30c8f5ae0c1bad8d775e95c332ddbd950f /source3/lib/dbwrap_ctdb.c
parent69d67122b2935ce4e7691a9480444edecac1ab8c (diff)
downloadsamba-541b8dec4e21e0a88ccc0d85bc01433b66eb3588.tar.gz
samba-541b8dec4e21e0a88ccc0d85bc01433b66eb3588.tar.bz2
samba-541b8dec4e21e0a88ccc0d85bc01433b66eb3588.zip
Add transactions to the dbwrap API
Only filled in for tdb so far, for rbt it's pointless, and ctdb itself needs to be extended (This used to be commit 0a55e018dd68af06d84332d54148bbfb0b510b22)
Diffstat (limited to 'source3/lib/dbwrap_ctdb.c')
-rw-r--r--source3/lib/dbwrap_ctdb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c
index f497f871d2..a66ea7ceb5 100644
--- a/source3/lib/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap_ctdb.c
@@ -441,6 +441,13 @@ static int db_ctdb_get_seqnum(struct db_context *db)
return tdb_get_seqnum(ctx->wtdb->tdb);
}
+static int db_ctdb_trans_dummy(struct db_context *db)
+{
+ /*
+ * Not implemented yet, just return ok
+ */
+ return 0;
+}
struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
const char *name,
@@ -495,6 +502,9 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
result->traverse = db_ctdb_traverse;
result->traverse_read = db_ctdb_traverse_read;
result->get_seqnum = db_ctdb_get_seqnum;
+ result->transaction_start = db_ctdb_trans_dummy;
+ result->transaction_commit = db_ctdb_trans_dummy;
+ result->transaction_cancel = db_ctdb_trans_dummy;
DEBUG(3,("db_open_ctdb: opened database '%s' with dbid 0x%x\n",
name, db_ctdb->db_id));