diff options
author | unknown <serg@serg.mysql.com> | 2002-11-08 20:57:36 +0100 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2002-11-08 20:57:36 +0100 |
commit | 363cdb3aa797350f7861799407ab217265b39597 (patch) | |
tree | b5435641f1ae2c05f048117f518f7ab0a1eee0cb /client/mysqlcheck.c | |
parent | c219f509c2adfaaf1a46c67b78676d6c8fde682e (diff) | |
download | mariadb-git-363cdb3aa797350f7861799407ab217265b39597.tar.gz |
--use-frm option to mysqlcheck
Diffstat (limited to 'client/mysqlcheck.c')
-rw-r--r-- | client/mysqlcheck.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 24b67a60255..1f440992861 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -34,7 +34,7 @@ static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0, opt_compress = 0, opt_databases = 0, opt_fast = 0, opt_medium_check = 0, opt_quick = 0, opt_all_in_1 = 0, opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0, - tty_password = 0; + tty_password = 0, opt_frm = 0; static uint verbose = 0, opt_mysql_port=0; static my_string opt_mysql_unix_port = 0; static char *opt_password = 0, *current_user = 0, *default_charset = 0, @@ -128,13 +128,17 @@ static struct my_option my_long_options[] = {"user", 'u', "User for login if not current user.", (gptr*) ¤t_user, (gptr*) ¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #endif + {"use-frm", OPT_FRM, + "When used with REPAIR, get table structure from .frm file, so the table can be repaired even if .MYI header is corrupted.", + (gptr*) &opt_frm, (gptr*) &opt_frm, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, + 0}, {"verbose", 'v', "Print info about the various stages.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; - + static const char *load_default_groups[] = { "mysqlcheck", "client", 0 }; @@ -223,7 +227,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), opt_password = my_strdup(argument, MYF(MY_FAE)); while (*argument) *argument++= 'x'; /* Destroy argument */ if (*start) - start[1] = 0; /* Cut length of argument */ + start[1] = 0; /* Cut length of argument */ } else tty_password = 1; @@ -452,6 +456,7 @@ static int handle_request_for_tables(char *tables, uint length) op = "REPAIR"; if (opt_quick) end = strmov(end, " QUICK"); if (opt_extended) end = strmov(end, " EXTENDED"); + if (opt_frm) end = strmov(end, " USE_FRM"); break; case DO_ANALYZE: op = "ANALYZE"; |