summaryrefslogtreecommitdiff
path: root/src/schema
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2014-11-18 16:32:14 +1100
committerAlex Gorrod <alexg@wiredtiger.com>2014-11-18 16:32:14 +1100
commit299c3cefbbfaf2476b580298f972295e55ac2b5e (patch)
treeefdce835d7ab322cd2a023b47611c2b4a541ad54 /src/schema
parent83cfd8774e9a2732c0a50f26d43064d11bcabd2d (diff)
downloadmongo-299c3cefbbfaf2476b580298f972295e55ac2b5e.tar.gz
Add support for immutable indices.
Refs #1344
Diffstat (limited to 'src/schema')
-rw-r--r--src/schema/schema_open.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/schema/schema_open.c b/src/schema/schema_open.c
index 364bd79bc16..d6fe5468780 100644
--- a/src/schema/schema_open.c
+++ b/src/schema/schema_open.c
@@ -140,6 +140,12 @@ __open_index(WT_SESSION_IMPL *session, WT_TABLE *table, WT_INDEX *idx)
WT_ERR(__wt_buf_fmt(session, buf, "%.*s", (int)cval.len, cval.str));
WT_ERR(__wt_strndup(session, buf->data, buf->size, &idx->source));
+ WT_ERR(__wt_config_getones(session, idx->config, "immutable", &cval));
+ if (cval.val == 0)
+ F_CLR(idx, WT_INDEX_IMMUTABLE);
+ else
+ F_SET(idx, WT_INDEX_IMMUTABLE);
+
WT_ERR(__wt_extractor_config(
session, idx->config, &idx->extractor, &idx->extractor_owned));