← Back to team overview

maria-developers team mailing list archive

Re: [Commits] Rev 2898: generalization of mtr to support suite.pm extensions: in http://bazaar.launchpad.net/~maria-captains/maria/5.1/

 

<serg@xxxxxxxxxxxx> writes:

> Hi, Kristian
> 
> Would you like to look once again at the mtr patch ?

Sure!

> I've removed auto-creation of my.cnf options by mere mentioning, as you
> found that confusing. Instead I added explicit group OPT, so now sphinx
> my.cnf would do
> 
>   [searchd]
>   port=@OPT.port
> 
>   [ENV]
>   SEARCHD_PORT=@searchd.port

Ah, that looks much better (and should be useful if one needs to assign a port
to some option that is not named exactly "port").

> === added file 'mysql-test/README.suites'
> --- a/mysql-test/README.suites	1970-01-01 00:00:00 +0000
> +++ b/mysql-test/README.suites	2010-08-11 08:15:49 +0000
> @@ -0,0 +1,129 @@
> +These are the assorted notes that will be turned into a manual eventually.

Excellent! Will be very useful to future mtr hackers.

> === modified file 'mysql-test/lib/My/Config.pm'
> --- a/mysql-test/lib/My/Config.pm	2008-09-05 13:31:09 +0000
> +++ b/mysql-test/lib/My/Config.pm	2010-08-11 08:15:49 +0000

> +package My::Config::Group::ENV;

> +#
> +# Return value for an option in the group, fail if it does not exist
> +#
> +sub value {
> +  my ($self, $option_name)= @_;
> +  my $option= $self->option($option_name);
> +
> +  if (! defined($option) and $ENV{$option_name}) {

This will prevent an option to be set from an environment variable with the
value "0". (Just a remark, I'm not sure if that is a problem or not though.)

It's a nice cleanup of mtr, and I'm positively surprised how much cleanup you
achieved with how little code changes, thanks!

Ok to push.

 - Kristian.



Follow ups