diff options
author | jani@rhols221.adsl.netsonic.fi <> | 2002-05-14 21:41:55 +0300 |
---|---|---|
committer | jani@rhols221.adsl.netsonic.fi <> | 2002-05-14 21:41:55 +0300 |
commit | 9eda54d1538f2c3caf80deaa1e1a43411893263c (patch) | |
tree | 4ab693251c296105301806199ac0d1ee72bdf62f /client/mysqlcheck.c | |
parent | 438e3debcb1266172f7f30daf9d2dd7d91037646 (diff) | |
download | mariadb-git-9eda54d1538f2c3caf80deaa1e1a43411893263c.tar.gz |
- Added new type GET_STRALC to my_getopt.
- Fixed some bugs, wrongly freed pointers, in some clients.
- Removed unneccessary code.
- Fixed some other minor bugs and added some options into
variables category, which had accidently been left out earlier.
Diffstat (limited to 'client/mysqlcheck.c')
-rw-r--r-- | client/mysqlcheck.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 8717b40fddd..dec002bff17 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -16,7 +16,7 @@ /* By Jani Tolonen, 2001-04-20, MySQL Development Team */ -#define CHECK_VERSION "2.1" +#define CHECK_VERSION "2.2" #include "client_priv.h" #include <my_getopt.h> @@ -94,7 +94,7 @@ static struct my_option my_long_options[] = {"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"host",'h', "Connect to host.", (gptr*) ¤t_host, - (gptr*) ¤t_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + (gptr*) ¤t_host, 0, GET_STRALC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"medium-check", 'm', "Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -199,12 +199,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 'a': what_to_do = DO_ANALYZE; break; - case OPT_DEFAULT_CHARSET: - default_charset = argument; - break; - case OPT_CHARSETS_DIR: - charsets_dir = argument; - break; case 'c': what_to_do = DO_CHECK; break; @@ -216,10 +210,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case '?': usage(); exit(0); - case 'h': - my_free(current_host, MYF(MY_ALLOW_ZERO_PTR)); - current_host = my_strdup(argument, MYF(MY_WME)); - break; case 'm': what_to_do = DO_CHECK; opt_medium_check = 1; @@ -227,11 +217,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 'o': what_to_do = DO_OPTIMIZE; break; -#ifndef DONT_ALLOW_USER_CHANGE - case 'u': - current_user = argument; - break; -#endif case 'p': if (argument) { @@ -245,15 +230,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), else tty_password = 1; break; - case 'P': - opt_mysql_port = (unsigned int) atoi(argument); - break; case 'r': what_to_do = DO_REPAIR; break; - case 'S': - opt_mysql_unix_port = argument; - break; case 'W': #ifdef __WIN__ opt_mysql_unix_port = MYSQL_NAMEDPIPE; |