diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-04-11 15:58:42 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-04-11 15:58:42 -0400 |
commit | 5488e656fa88b46ac187cef6533a6e4cb3cc62cc (patch) | |
tree | 9377cb34d9852a5d1872f81b3f3814bdac5e70c0 /src/meta | |
parent | db2ce0c4e6dbef194573c40d600e1ed3e7cc8835 (diff) | |
download | mongo-5488e656fa88b46ac187cef6533a6e4cb3cc62cc.tar.gz |
More work on data-source configuration support.
We can't stack a random set of entries into a cfg[] because we don't
want to allocate memory in the API. Instead, whenever a method's
arguments are reconfigured, re-build the base configuration string by
appending the new configuration, and re-build the checks array, that way
we always have a single base configuration string and a single checks
array.
Re-work how we're handling lists, we can't expect the application to
crack them, they can be seriously messy. If it's a list, create an
array of NULL-terminated refrences to nul-terminated strings (create
an "argv" array, in other words). It's ugly, and the user has to free
the memory, but I don't see an alternative.
Diffstat (limited to 'src/meta')
-rw-r--r-- | src/meta/meta_table.c | 2 | ||||
-rw-r--r-- | src/meta/meta_turtle.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/meta/meta_table.c b/src/meta/meta_table.c index c9b65efad11..3bcf8e588db 100644 --- a/src/meta/meta_table.c +++ b/src/meta/meta_table.c @@ -107,7 +107,7 @@ __wt_metadata_cursor( WT_DATA_HANDLE *saved_dhandle; WT_DECL_RET; const char *cfg[] = - { WT_CONFIG_NAME(session, session_open_cursor), config, NULL }; + { WT_CONFIG_BASE(session, session_open_cursor), config, NULL }; saved_dhandle = session->dhandle; WT_ERR(__wt_metadata_open(session)); diff --git a/src/meta/meta_turtle.c b/src/meta/meta_turtle.c index e82f86a6af7..fedd0ff01f8 100644 --- a/src/meta/meta_turtle.c +++ b/src/meta/meta_turtle.c @@ -40,7 +40,7 @@ __wt_meta_turtle_init(WT_SESSION_IMPL *session, int *existp) WT_ERR(__wt_buf_fmt(session, buf, "key_format=S,value_format=S,version=(major=%d,minor=%d)", WT_BTREE_MAJOR_VERSION, WT_BTREE_MINOR_VERSION)); - cfg[0] = WT_CONFIG_NAME(session, file_meta); + cfg[0] = WT_CONFIG_BASE(session, file_meta); cfg[1] = buf->data; cfg[2] = NULL; WT_ERR(__wt_config_collapse(session, cfg, &metaconf)); |