diff options
author | Volker Lendecke <vl@samba.org> | 2013-01-11 15:32:39 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-02-08 12:58:57 +0100 |
commit | c03d5c5740f9d1894a971110029e8f567d300d8a (patch) | |
tree | d0a1ff7af16beca61eb8775a5ee65cbdaef277f6 /lib/dbwrap | |
parent | dc2e47508d7075cf6507e0dea03da6999ef9097e (diff) | |
download | samba-c03d5c5740f9d1894a971110029e8f567d300d8a.tar.gz samba-c03d5c5740f9d1894a971110029e8f567d300d8a.tar.bz2 samba-c03d5c5740f9d1894a971110029e8f567d300d8a.zip |
dbwrap: Prevent transactions on non-persistent dbs
dbwrap_ctdb does not allow this anyway. This patch will avoid suprises
when going non-clustered to clustered. Not everybody is developing
against a clustered environment :-)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/dbwrap')
-rw-r--r-- | lib/dbwrap/dbwrap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/dbwrap/dbwrap.c b/lib/dbwrap/dbwrap.c index 15eb239c35..f0b7a9a3ac 100644 --- a/lib/dbwrap/dbwrap.c +++ b/lib/dbwrap/dbwrap.c @@ -452,6 +452,11 @@ int dbwrap_get_seqnum(struct db_context *db) int dbwrap_transaction_start(struct db_context *db) { + if (!db->persistent) { + DEBUG(1, ("transactions not supported on non-persistent " + "database %s\n", db->name)); + return -1; + } return db->transaction_start(db); } |