summaryrefslogtreecommitdiff
path: root/src/schema
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-02-11 17:19:11 +1100
committerMichael Cahill <michael.cahill@mongodb.com>2016-02-11 17:19:11 +1100
commitc20cabae70d22f8102295ae1b83decbee862fd7d (patch)
treee62aaa85095661f3e52a0933efa42f790d872961 /src/schema
parent8120bd2c39bbdf5a6bcf6e39f70c34cb8784587a (diff)
parent3bc10f558dd1311581c74d89db11ec74844258c8 (diff)
downloadmongo-c20cabae70d22f8102295ae1b83decbee862fd7d.tar.gz
Merge branch 'develop' into WT-2346
Diffstat (limited to 'src/schema')
-rw-r--r--src/schema/schema_create.c5
-rw-r--r--src/schema/schema_drop.c2
-rw-r--r--src/schema/schema_rename.c2
-rw-r--r--src/schema/schema_worker.c2
4 files changed, 6 insertions, 5 deletions
diff --git a/src/schema/schema_create.c b/src/schema/schema_create.c
index 8cdcbbcad54..25bbd496798 100644
--- a/src/schema/schema_create.c
+++ b/src/schema/schema_create.c
@@ -550,8 +550,9 @@ __create_index(WT_SESSION_IMPL *session,
/* Make sure that the configuration is valid. */
WT_ERR(__wt_schema_open_index(
session, table, idxname, strlen(idxname), &idx));
- if (!exists)
- WT_ERR(__fill_index(session, table, idx));
+
+ /* If there is data in the table, fill the index. */
+ WT_ERR(__fill_index(session, table, idx));
err: __wt_free(session, idxconf);
__wt_free(session, origconf);
diff --git a/src/schema/schema_drop.c b/src/schema/schema_drop.c
index 6ac76930c9a..ead8cc45c62 100644
--- a/src/schema/schema_drop.c
+++ b/src/schema/schema_drop.c
@@ -29,7 +29,7 @@ __drop_file(
return (EINVAL);
/* Close all btree handles associated with this file. */
- WT_WITH_HANDLE_LIST_LOCK(session, ret,
+ WT_WITH_HANDLE_LIST_LOCK(session,
ret = __wt_conn_dhandle_close_all(session, uri, force));
WT_RET(ret);
diff --git a/src/schema/schema_rename.c b/src/schema/schema_rename.c
index 4ec126394dd..21402ed9332 100644
--- a/src/schema/schema_rename.c
+++ b/src/schema/schema_rename.c
@@ -30,7 +30,7 @@ __rename_file(
return (EINVAL);
/* Close any btree handles in the file. */
- WT_WITH_HANDLE_LIST_LOCK(session, ret,
+ WT_WITH_HANDLE_LIST_LOCK(session,
ret = __wt_conn_dhandle_close_all(session, uri, false));
WT_ERR(ret);
diff --git a/src/schema/schema_worker.c b/src/schema/schema_worker.c
index 0ea215043d5..e60a7107786 100644
--- a/src/schema/schema_worker.c
+++ b/src/schema/schema_worker.c
@@ -49,7 +49,7 @@ __wt_schema_worker(WT_SESSION_IMPL *session,
* any open file handles, including checkpoints.
*/
if (FLD_ISSET(open_flags, WT_DHANDLE_EXCLUSIVE)) {
- WT_WITH_HANDLE_LIST_LOCK(session, ret,
+ WT_WITH_HANDLE_LIST_LOCK(session,
ret = __wt_conn_dhandle_close_all(
session, uri, false));
WT_ERR(ret);