diff options
author | unknown <jani@rhols221.adsl.netsonic.fi> | 2002-05-14 21:41:55 +0300 |
---|---|---|
committer | unknown <jani@rhols221.adsl.netsonic.fi> | 2002-05-14 21:41:55 +0300 |
commit | 21c1e5be444f61c96351ff7d27e955356a65c7d6 (patch) | |
tree | 4ab693251c296105301806199ac0d1ee72bdf62f /client/mysqlcheck.c | |
parent | f20dda3ea9c36589955b85abcff5bea5bb534330 (diff) | |
download | mariadb-git-21c1e5be444f61c96351ff7d27e955356a65c7d6.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.
client/mysql.cc:
Fixed some wrong freed pointers. Removed unneccessary code.
Changed some types from GET_STR to GET_STRALC.
client/mysqladmin.c:
Fixed some wrong freed pointers. Removed unneccessary code.
Changed some types from GET_STR to GET_STRALC.
client/mysqlcheck.c:
Fixed some wrong freed pointers. Removed unneccessary code.
Changed some types from GET_STR to GET_STRALC.
client/mysqldump.c:
Fixed some wrong freed pointers. Removed unneccessary code.
Changed some types from GET_STR to GET_STRALC.
client/mysqlimport.c:
Removed unneccessary code.
Fixed a bug in option --ignore-lines
client/mysqlshow.c:
Removed unneccessary code.
include/my_getopt.h:
Added new type, GET_STRALC. The name stands for GET STRING ALLOC,
which means that the struct member value and u_max_value are
strings that must be alloced and freed when used.
The normal GET_STR works similarly otherwise, except that it's
arguments are just pointers to strings, not alloced ones.
mysys/my_getopt.c:
Added support for GET_STRALC
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; |