summaryrefslogtreecommitdiff
path: root/src/utilities
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2012-06-18 10:49:37 +0000
committerKeith Bostic <keith@wiredtiger.com>2012-06-18 10:49:37 +0000
commit89ec09950b80cc775e2dbf3ffd94364c34fc5297 (patch)
tree64eabb9226ee36ff97ec802d0f3e37cf4c0a2f65 /src/utilities
parent4980c5119c5717ac01c21ad4d635ff5476903712 (diff)
downloadmongo-89ec09950b80cc775e2dbf3ffd94364c34fc5297.tar.gz
session.drop no longer deletes snapshots, remove support for the -s option
to the wt drop command.
Diffstat (limited to 'src/utilities')
-rw-r--r--src/utilities/util_drop.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/utilities/util_drop.c b/src/utilities/util_drop.c
index 3e6536deb5c..0e96e2578c6 100644
--- a/src/utilities/util_drop.c
+++ b/src/utilities/util_drop.c
@@ -12,19 +12,12 @@ static int usage(void);
int
util_drop(WT_SESSION *session, int argc, char *argv[])
{
- size_t len;
WT_DECL_RET;
int ch;
- const char *snapshot;
- char *name, *config;
+ char *name;
- config = NULL;
- snapshot = NULL;
- while ((ch = util_getopt(argc, argv, "s:")) != EOF)
+ while ((ch = util_getopt(argc, argv, "")) != EOF)
switch (ch) {
- case 's':
- snapshot = util_optarg;
- break;
case '?':
default:
return (usage());
@@ -39,22 +32,8 @@ util_drop(WT_SESSION *session, int argc, char *argv[])
if ((name = util_name(*argv, "table", UTIL_ALL_OK)) == NULL)
return (1);
- if (snapshot == NULL)
- ret = session->drop(session, name, "force");
- else {
- len = strlen(snapshot) +
- strlen("snapshot=") + strlen("force") + 10;
- if ((config = malloc(len)) == NULL)
- goto err;
- (void)snprintf(config, len, "snapshot=%s,force", snapshot);
- ret = session->drop(session, name, config);
- }
+ ret = session->drop(session, name, "force");
- if (0) {
-err: ret = 1;
- }
- if (config != NULL)
- free(config);
if (name != NULL)
free(name);
return (ret);
@@ -65,7 +44,7 @@ usage(void)
{
(void)fprintf(stderr,
"usage: %s %s "
- "drop [-s snapshot] uri\n",
+ "drop uri\n",
progname, usage_prefix);
return (1);
}