← Back to team overview

maria-developers team mailing list archive

Re: [Commits] 9d8ad0d: Add --persistent option for mysqlcheck

 

Hi Sergey,

The commit message still has his name on it.

I've only added some code to it, but I've left his original author.

Vicentiu

On Tue, 15 Dec 2015 at 11:32 Sergey Vojtovich <svoj@xxxxxxxxxxx> wrote:

> Hi Vicentu,
>
> this is contribution by Daniel. He should get some credit for this.
> Assuming you
> didn't change this code much, this should be committed on Daniel's behalf,
> so
> that he gets credit on github. Or at the very least mention in a comment
> contribution author.
>
> Thanks,
> Sergey
>
> On Tue, Dec 15, 2015 at 11:11:50AM +0200, Vicentiu Ciorbaru wrote:
> > revision-id: 9d8ad0d79e3c3a1a9bf7c8cc6477ee4e69fba633
> (mariadb-10.0.22-63-g9d8ad0d)
> > parent(s): e9b4a041af5122dffd59012493c565e6e3db2664
> > committer: Vicențiu Ciorbaru
> > timestamp: 2015-12-15 11:11:28 +0200
> > message:
> >
> > Add --persistent option for mysqlcheck
> >
> > 10.0 has an "analyze table .. persistent for all" syntax. This adds
> > --persistent to mysqlcheck(mysqlanalyize) to perform this extended
> > analyze table option.
> >
> > ---
> >  client/mysqlcheck.c |  6 +++++-
> >  man/mysqlcheck.1    | 18 +++++++++++++++++-
> >  2 files changed, 22 insertions(+), 2 deletions(-)
> >
> > diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
> > index ead4127..b9e5478 100644
> > --- a/client/mysqlcheck.c
> > +++ b/client/mysqlcheck.c
> > @@ -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;
> > @@ -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 c175483..e05bbf8 100644
> > --- a/man/mysqlcheck.1
> > +++ b/man/mysqlcheck.1
> > @@ -1,6 +1,6 @@
> >  '\" t
> >  .\"
> > -.TH "\FBMYSQLCHECK\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB
> Database System"
> > +.TH "\FBMYSQLCHECK\FR" "1" "27/12/2015" "MariaDB 10\&.0" "MariaDB
> Database System"
> >  .\" -----------------------------------------------------------------
> >  .\" * set default formatting
> >  .\" -----------------------------------------------------------------
> > @@ -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,
> > _______________________________________________
> > commits mailing list
> > commits@xxxxxxxxxxx
> > https://lists.askmonty.org/cgi-bin/mailman/listinfo/commits
> _______________________________________________
> commits mailing list
> commits@xxxxxxxxxxx
> https://lists.askmonty.org/cgi-bin/mailman/listinfo/commits

Follow ups

References