summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/schema
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/schema')
-rw-r--r--src/third_party/wiredtiger/src/schema/schema_create.c20
-rw-r--r--src/third_party/wiredtiger/src/schema/schema_open.c9
-rw-r--r--src/third_party/wiredtiger/src/schema/schema_truncate.c2
3 files changed, 16 insertions, 15 deletions
diff --git a/src/third_party/wiredtiger/src/schema/schema_create.c b/src/third_party/wiredtiger/src/schema/schema_create.c
index 80e443d8a21..c003ad90ca7 100644
--- a/src/third_party/wiredtiger/src/schema/schema_create.c
+++ b/src/third_party/wiredtiger/src/schema/schema_create.c
@@ -180,10 +180,11 @@ __create_colgroup(WT_SESSION_IMPL *session,
const char **cfgp, *cfg[4] =
{ WT_CONFIG_BASE(session, colgroup_meta), config, NULL, NULL };
const char *sourcecfg[] = { config, NULL, NULL };
- const char *cgname, *source, *tablename;
- char *cgconf, *sourceconf, *oldconf;
+ const char *cgname, *source, *sourceconf, *tablename;
+ char *cgconf, *oldconf;
- cgconf = sourceconf = oldconf = NULL;
+ sourceconf = NULL;
+ cgconf = oldconf = NULL;
WT_CLEAR(fmt);
WT_CLEAR(confbuf);
WT_CLEAR(namebuf);
@@ -244,7 +245,7 @@ __create_colgroup(WT_SESSION_IMPL *session,
table, cval.str, cval.len, NULL, 1, &fmt));
}
sourcecfg[1] = fmt.data;
- WT_ERR(__wt_config_concat(session, sourcecfg, &sourceconf));
+ WT_ERR(__wt_config_merge(session, sourcecfg, NULL, &sourceconf));
WT_ERR(__wt_schema_create(session, source, sourceconf));
@@ -322,13 +323,14 @@ __create_index(WT_SESSION_IMPL *session,
const char *cfg[4] =
{ WT_CONFIG_BASE(session, index_meta), NULL, NULL, NULL };
const char *sourcecfg[] = { config, NULL, NULL };
- const char *source, *idxname, *tablename;
- char *sourceconf, *idxconf;
+ const char *source, *sourceconf, *idxname, *tablename;
+ char *idxconf;
size_t tlen;
int have_extractor;
u_int i, npublic_cols;
- idxconf = sourceconf = NULL;
+ sourceconf = NULL;
+ idxconf = NULL;
WT_CLEAR(confbuf);
WT_CLEAR(fmt);
WT_CLEAR(extra_cols);
@@ -458,7 +460,7 @@ __create_index(WT_SESSION_IMPL *session,
session, &fmt, ",index_key_columns=%u", npublic_cols));
sourcecfg[1] = fmt.data;
- WT_ERR(__wt_config_concat(session, sourcecfg, &sourceconf));
+ WT_ERR(__wt_config_merge(session, sourcecfg, NULL, &sourceconf));
WT_ERR(__wt_schema_create(session, source, sourceconf));
@@ -573,7 +575,7 @@ __create_data_source(WT_SESSION_IMPL *session,
{
WT_CONFIG_ITEM cval;
const char *cfg[] = {
- WT_CONFIG_BASE(session, session_create), config, NULL };
+ WT_CONFIG_BASE(session, WT_SESSION_create), config, NULL };
/*
* Check to be sure the key/value formats are legal: the underlying
diff --git a/src/third_party/wiredtiger/src/schema/schema_open.c b/src/third_party/wiredtiger/src/schema/schema_open.c
index 5bc589f0781..414722652a0 100644
--- a/src/third_party/wiredtiger/src/schema/schema_open.c
+++ b/src/third_party/wiredtiger/src/schema/schema_open.c
@@ -187,13 +187,12 @@ __open_index(WT_SESSION_IMPL *session, WT_TABLE *table, WT_INDEX *idx)
/* Start with the declared index columns. */
WT_ERR(__wt_config_subinit(session, &colconf, &idx->colconf));
- npublic_cols = 0;
- while ((ret = __wt_config_next(&colconf, &ckey, &cval)) == 0) {
+ for (npublic_cols = 0;
+ (ret = __wt_config_next(&colconf, &ckey, &cval)) == 0;
+ ++npublic_cols)
WT_ERR(__wt_buf_catfmt(
session, buf, "%.*s,", (int)ckey.len, ckey.str));
- ++npublic_cols;
- }
- if (ret != 0 && ret != WT_NOTFOUND)
+ if (ret != WT_NOTFOUND)
goto err;
/*
diff --git a/src/third_party/wiredtiger/src/schema/schema_truncate.c b/src/third_party/wiredtiger/src/schema/schema_truncate.c
index 1eb76226aad..be9f6bcfb57 100644
--- a/src/third_party/wiredtiger/src/schema/schema_truncate.c
+++ b/src/third_party/wiredtiger/src/schema/schema_truncate.c
@@ -84,7 +84,7 @@ __truncate_dsrc(WT_SESSION_IMPL *session, const char *uri)
const char *cfg[2];
/* Open a cursor and traverse the object, removing every entry. */
- cfg[0] = WT_CONFIG_BASE(session, session_open_cursor);
+ cfg[0] = WT_CONFIG_BASE(session, WT_SESSION_open_cursor);
cfg[1] = NULL;
WT_RET(__wt_open_cursor(session, uri, NULL, cfg, &cursor));
while ((ret = cursor->next(cursor)) == 0)