Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion client/mysqlcheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0,
opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0,
tty_password= 0, opt_frm= 0, debug_info_flag= 0, debug_check_flag= 0,
opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0,
opt_do_tables= 1;
opt_persistent_all= 0, opt_do_tables= 1;
static my_bool opt_write_binlog= 1, opt_flush_tables= 0;
static uint verbose = 0, opt_mysql_port=0;
static int my_end_arg;
Expand Down Expand Up @@ -160,6 +160,9 @@ static struct my_option my_long_options[] =
{"password", 'p',
"Password to use when connecting to server. If password is not given, it's solicited on the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"persistent", 'Z', "When using ANALYZE TABLE use the PERSISTENT FOR ALL option.",
&opt_persistent_all, &opt_persistent_all, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0},
#ifdef __WIN__
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
Expand Down Expand Up @@ -910,6 +913,7 @@ static int handle_request_for_tables(char *tables, size_t length, my_bool view)
case DO_ANALYZE:
DBUG_ASSERT(!view);
op= (opt_write_binlog) ? "ANALYZE" : "ANALYZE NO_WRITE_TO_BINLOG";
if (opt_persistent_all) end = strmov(end, " PERSISTENT FOR ALL");
break;
case DO_OPTIMIZE:
DBUG_ASSERT(!view);
Expand Down
16 changes: 16 additions & 0 deletions man/mysqlcheck.1
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,22 @@ Specifying a password on the command line should be considered insecure\&. You c
.sp -1
.IP \(bu 2.3
.\}
.\" mysqlcheck: persisent option
.\" persistent option: mysql
\fB\-\-persistent\fR,
\fB\-Z\fR
.sp
Used with ANALYZE TABLE to append the option PERSISENT FOR ALL.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysqlcheck: pipe option
.\" pipe option: mysql
\fB\-\-pipe\fR,
Expand Down