summaryrefslogtreecommitdiff
path: root/src/cursor/cur_metadata.c
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2016-03-10 08:58:27 -0500
committerKeith Bostic <keith@wiredtiger.com>2016-03-10 08:58:27 -0500
commit09d17833f87fc89b55481fc57c700a503163bff7 (patch)
treee33c1c723a91b0388140edc37be82577ab577741 /src/cursor/cur_metadata.c
parent76c7399dd2e802cd2efacb164498564f2177473e (diff)
downloadmongo-09d17833f87fc89b55481fc57c700a503163bff7.tar.gz
WT-2381: dump utility discards table config
Michael notes dump no longer needs to use the metadata:create URI, that simplifies the change, most importantly, we no longer need two versions of config_collapse.
Diffstat (limited to 'src/cursor/cur_metadata.c')
-rw-r--r--src/cursor/cur_metadata.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/cursor/cur_metadata.c b/src/cursor/cur_metadata.c
index c25c7d1bdee..3d702e2ea8c 100644
--- a/src/cursor/cur_metadata.c
+++ b/src/cursor/cur_metadata.c
@@ -33,9 +33,11 @@
/*
* __wt_schema_create_final --
* Create a single configuration line from a set of configuration strings,
- * including all of the defaults declared for a session.create. Here for the wt
- * dump command utility, which reads a set of configuration strings and needs to
- * add in the defaults and then collapse them into single string for load.
+ * including all of the defaults declared for a session.create, and stripping
+ * any configuration strings that don't belong in a session.create. Here for
+ * the wt dump command utility, which reads a set of configuration strings and
+ * needs to add in the defaults and then collapse them into single string for
+ * a subsequent load.
*/
int
__wt_schema_create_final(
@@ -48,7 +50,8 @@ __wt_schema_create_final(
/*
* Count the entries in the original,
* Allocate a copy with the defaults as the first entry,
- * Collapse the whole thing into a single configuration string.
+ * Collapse the whole thing into a single configuration string (which
+ * also strips any entries that don't appear in the first entry).
*/
for (i = 0; cfg_arg[i] != NULL; ++i)
;
@@ -67,8 +70,7 @@ __wt_schema_create_final(
/*
* __schema_create_strip --
* Discard any configuration information from a schema entry that is not
- * applicable to an session.create call. Here for the wt dump command utility,
- * which only wants to dump the schema information needed for load.
+ * applicable to an session.create call. Here for the metadata:create URI.
*/
static int
__schema_create_strip(
@@ -77,7 +79,7 @@ __schema_create_strip(
const char *cfg[] =
{ WT_CONFIG_BASE(session, WT_SESSION_create), value, NULL };
- return (__wt_config_strip_and_collapse(session, cfg, value_ret));
+ return (__wt_config_collapse(session, cfg, value_ret));
}
/*