summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_update_record.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2012-03-12 13:13:51 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2012-03-12 13:13:51 +1100
commitb9e581e720f567d732aef534f6c9da54438a877c (patch)
tree1c81dc4dfd278676a33edf7b779768cf6df5f385 /ctdb/server/ctdb_update_record.c
parent62daab3688737d44477b617675146b6bc327ebdd (diff)
downloadsamba-b9e581e720f567d732aef534f6c9da54438a877c.tar.gz
samba-b9e581e720f567d732aef534f6c9da54438a877c.tar.xz
samba-b9e581e720f567d732aef534f6c9da54438a877c.zip
ReadOnly: Only restrict the readonly sanity/paranoia check that only allows
UPDATE_RECORD to create a record to only apply to normal databases, not persistent databases or else the net registry command breaks and other persistent database creation/updates . (This used to be ctdb commit 68390cb1e8c7f30be034b8ca6c9215b40147305b)
Diffstat (limited to 'ctdb/server/ctdb_update_record.c')
-rw-r--r--ctdb/server/ctdb_update_record.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_update_record.c b/ctdb/server/ctdb_update_record.c
index f8be8e88c47..a4a6fc41a1d 100644
--- a/ctdb/server/ctdb_update_record.c
+++ b/ctdb/server/ctdb_update_record.c
@@ -325,7 +325,10 @@ int32_t ctdb_control_update_record(struct ctdb_context *ctdb,
state->ctdb_db = ctdb_db;
state->c = c;
state->m = m;
- state->flags = UPDATE_FLAGS_REPLACE_ONLY;
+ state->flags = 0;
+ if (!ctdb_db->persistent) {
+ state->flags = UPDATE_FLAGS_REPLACE_ONLY;
+ }
/* create a child process to take out a transaction and
write the data.