diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index ead4127dad679..21cf99258606d 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -42,7 +42,7 @@ static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 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, 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_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0, 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; @@ -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}, @@ -909,6 +912,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); diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index 11e968db18c5b..ff85c05b4eb13 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -7,7 +7,7 @@ .\" Source: MySQL 5.1 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "2015/12/27" "MySQL 5\&.1" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- @@ -667,6 +667,22 @@ Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .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,