summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-04-25 12:42:36 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-04-25 12:42:36 -0400
commitccd13acd19809c3b4958832c4629eeb33384a4c4 (patch)
treef8d2bf55ec08709989b957bcdc3dec7243770b8a
parent80eac838c9dcc0b4e1833d8b88a5b2a57fbeae10 (diff)
downloadmongo-ccd13acd19809c3b4958832c4629eeb33384a4c4.tar.gz
Don't allow statistics_log "sources" configuration for objects other
than file: for now, it won't work until DHANDLE support goes in for those objects.
-rw-r--r--src/conn/conn_stat.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/conn/conn_stat.c b/src/conn/conn_stat.c
index 1ac989a7f8f..33b6365d577 100644
--- a/src/conn/conn_stat.c
+++ b/src/conn/conn_stat.c
@@ -69,9 +69,20 @@ __statlog_config(WT_SESSION_IMPL *session, const char **cfg, int *runp)
WT_RET(__wt_calloc_def(session, cnt + 1, &conn->stat_sources));
WT_RET(__wt_config_subinit(session, &objectconf, &cval));
for (cnt = 0;
- (ret = __wt_config_next(&objectconf, &k, &v)) == 0; ++cnt)
+ (ret = __wt_config_next(&objectconf, &k, &v)) == 0; ++cnt) {
+ /*
+ * XXX
+ * Only allow "file:" for now, other data sources have
+ * not been converted to use DHANDLEs so we don't have
+ * an easy way to get to the lists of open objects.
+ */
+ if (!WT_PREFIX_MATCH(k.str, "file:"))
+ WT_RET_MSG(session, EINVAL,
+ "statistics_log sources configuration only "
+ "supports objects of type \"file:\"");
WT_RET(__wt_strndup(session,
k.str, k.len, &conn->stat_sources[cnt]));
+ }
WT_RET_NOTFOUND_OK(ret);
}