summaryrefslogtreecommitdiff
path: root/test/format/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/format/config.c')
-rw-r--r--test/format/config.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/test/format/config.c b/test/format/config.c
index 22b40f7164d..2685438af00 100644
--- a/test/format/config.c
+++ b/test/format/config.c
@@ -1,5 +1,5 @@
/*-
- * Public Domain 2014-2016 MongoDB, Inc.
+ * Public Domain 2014-2017 MongoDB, Inc.
* Public Domain 2008-2014 WiredTiger, Inc.
*
* This is free and unencumbered software released into the public domain.
@@ -489,6 +489,8 @@ config_pct(void)
#define CONFIG_DELETE_ENTRY 0
{ "delete_pct", &g.c_delete_pct, 0 },
{ "insert_pct", &g.c_insert_pct, 0 },
+#define CONFIG_MODIFY_ENTRY 2
+ { "modify_pct", &g.c_modify_pct, 0 },
{ "read_pct", &g.c_read_pct, 0 },
{ "write_pct", &g.c_write_pct, 0 },
};
@@ -508,6 +510,16 @@ config_pct(void)
testutil_die(EINVAL,
"operation percentages total to more than 100%%");
+ /* Cursor modify isn't possible for fixed-length column store. */
+ if (g.type == FIX) {
+ if (config_is_perm("modify_pct"))
+ testutil_die(EINVAL,
+ "WT_CURSOR.modify not supported by fixed-length "
+ "column store or LSM");
+ list[CONFIG_MODIFY_ENTRY].order = 0;
+ *list[CONFIG_MODIFY_ENTRY].vp = 0;
+ }
+
/*
* If the delete percentage isn't nailed down, periodically set it to
* 0 so salvage gets run. Don't do it on the first run, all our smoke
@@ -547,8 +559,9 @@ config_pct(void)
list[max_slot].order = 0;
pct -= *list[max_slot].vp;
}
- testutil_assert(g.c_delete_pct +
- g.c_insert_pct + g.c_read_pct + g.c_write_pct == 100);
+
+ testutil_assert(g.c_delete_pct + g.c_insert_pct +
+ g.c_modify_pct + g.c_read_pct + g.c_write_pct == 100);
}
/*