mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
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>
This commit is contained in:
parent
dc2e47508d
commit
c03d5c5740
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user