diff options
author | Luke Chen <luke.chen@mongodb.com> | 2019-09-09 14:45:50 +1000 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2019-09-09 14:48:15 +1000 |
commit | d1c52b7aafac44e16dd62ce94663eab1aa16f921 (patch) | |
tree | 2aea018150b745b0fc7ef3dc626c4ef4164d2704 /src/third_party/wiredtiger/src/utilities/util_alter.c | |
parent | b326fd656716e95418e563ff12368a3015994b5e (diff) | |
download | mongo-d1c52b7aafac44e16dd62ce94663eab1aa16f921.tar.gz |
Import wiredtiger: c600bde20363629405082a3ea985b70dfb00850e from branch mongodb-4.2
ref: 280c572c80..c600bde203
for: 4.2.1
WT-4535 Enhance wt command line utility to use read-only mode
WT-4658 Apply Clang Format
WT-4810 Adding WT_ERR_ASSERT and WT_RET_ASSERT macros
WT-4831 Add option to python tests to not fail if stdout is not empty
WT-4884 Test for recovery correctness with modify operations
WT-4935 Add a perf test to find out the wiredtiger_calc_modify overhead
WT-4966 Fix valgrind detected memory leak from test/csuite/import/smoke.sh
WT-5043 Add debugging to aid in test/format hang
WT-5046 Prepared transactions aren't properly cleared from global table with WT_CONN_LOG_DEBUG_MODE enabled
WT-5062 Adjust the record size to consume less size
WT-5063 Return proper error message for cursor modify operation for not supported cursor types
WT-5074 Fix "make check" on exotic architectures
WT-5076 Cut WiredTiger 3.2.1 release
WT-5080 New wtperf workload modify_distribute option
WT-5085 Fix spacing in wtperf output
WT-5087 Add time tracking at start of reconciliation
WT-5088 Refine clearing and setting of debug timer
WT-5100 Update test format to disable readonly mode in utility
Diffstat (limited to 'src/third_party/wiredtiger/src/utilities/util_alter.c')
-rw-r--r-- | src/third_party/wiredtiger/src/utilities/util_alter.c | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/src/third_party/wiredtiger/src/utilities/util_alter.c b/src/third_party/wiredtiger/src/utilities/util_alter.c index 441dedf8bc9..996c489aa19 100644 --- a/src/third_party/wiredtiger/src/utilities/util_alter.c +++ b/src/third_party/wiredtiger/src/utilities/util_alter.c @@ -13,40 +13,38 @@ static int usage(void); int util_alter(WT_SESSION *session, int argc, char *argv[]) { - WT_DECL_RET; - int ch; - char **configp; - - while ((ch = __wt_getopt(progname, argc, argv, "")) != EOF) - switch (ch) { - case '?': - default: - return (usage()); - } - - argc -= __wt_optind; - argv += __wt_optind; - - /* The remaining arguments are uri/string pairs. */ - if (argc % 2 != 0) - return (usage()); - - for (configp = argv; *configp != NULL; configp += 2) - if ((ret = session->alter( - session, configp[0], configp[1])) != 0) { - (void)util_err(session, ret, - "session.alter: %s, %s", configp[0], configp[1]); - return (1); - } - return (0); + WT_DECL_RET; + int ch; + char **configp; + + while ((ch = __wt_getopt(progname, argc, argv, "")) != EOF) + switch (ch) { + case '?': + default: + return (usage()); + } + + argc -= __wt_optind; + argv += __wt_optind; + + /* The remaining arguments are uri/string pairs. */ + if (argc % 2 != 0) + return (usage()); + + for (configp = argv; *configp != NULL; configp += 2) + if ((ret = session->alter(session, configp[0], configp[1])) != 0) { + (void)util_err(session, ret, "session.alter: %s, %s", configp[0], configp[1]); + return (1); + } + return (0); } static int usage(void) { - (void)fprintf(stderr, - "usage: %s %s " - "alter uri configuration ...\n", - progname, usage_prefix); - return (1); + (void)fprintf(stderr, + "usage: %s %s " + "alter uri configuration ...\n", + progname, usage_prefix); + return (1); } |