diff options
author | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-06-27 12:01:10 +1000 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-06-27 12:01:10 +1000 |
commit | 95d911ab246e444192f34dc395652dba2653dd3c (patch) | |
tree | 8e7c4692125a841a486607ccfe26e8499bc4c398 /test/format/config.c | |
parent | 19cd4d9be2c0fd980c00bb04bc949970002f5cb2 (diff) | |
parent | d139a5d5be1d7ba94130502b379a61a809e66272 (diff) | |
download | mongo-2.9.3.tar.gz |
Merge branch 'mongodb-3.6'2.9.3
Diffstat (limited to 'test/format/config.c')
-rw-r--r-- | test/format/config.c | 19 |
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); } /* |