diff options
author | Keith Bostic <keith@wiredtiger.com> | 2014-12-16 17:18:37 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2014-12-16 17:18:37 -0500 |
commit | dc520d3e0c8f81833aed878525f85a0f1914ea01 (patch) | |
tree | 39100eb1a214bd0b263ed7016e7b9b2fe120feb9 /src/config/config.c | |
parent | 9b7bbd225a0e410b6f1ccdb53f6acbf9ad3c100b (diff) | |
download | mongo-dc520d3e0c8f81833aed878525f85a0f1914ea01.tar.gz |
When creating a data-source, allow for a collator set to the empty string
or to "none", we document that now.
Diffstat (limited to 'src/config/config.c')
-rw-r--r-- | src/config/config.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/config/config.c b/src/config/config.c index 4285b23be23..362cc990960 100644 --- a/src/config/config.c +++ b/src/config/config.c @@ -700,6 +700,21 @@ __wt_config_getones(WT_SESSION_IMPL *session, } /* + * __wt_config_getones_none -- + * Get the value for a given string key from a single config string. + * Treat "none" as empty. + */ +int +__wt_config_getones_none(WT_SESSION_IMPL *session, + const char *config, const char *key, WT_CONFIG_ITEM *value) +{ + WT_RET(__wt_config_getones_none(session, config, key, value)); + if (WT_STRING_CASE_MATCH("none", value->str, value->len)) + value->len = 0; + return (0); +} + +/* * __wt_config_gets_def -- * Performance hack: skip parsing config strings by hard-coding defaults. * |