MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Magnus Svensson Date:January 21 2009 10:17am
Subject:bzr commit into mysql-5.1 branch (msvensson:2714) Bug#39972
View as plain text  
#At file:///home/msvensson/mysql/5.1-rpl/ based on revid:msvensson@stripped

 2714 Magnus Svensson	2009-01-21
      Bug#39972 mysql-test-run.pl: Confusing error message under special conditions
       - Fix problem with for example ./mtr --timer, caused by new version of "Getopt::Long"
       - Evaluating the "$opt" variable as a string, returns the name of the parameter
         to be modified instead of "Getopt::Long::Callback" which is the class name
modified:
  mysql-test/lib/mtr_cases.pm
  mysql-test/lib/mtr_report.pm

=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm	2008-12-12 21:51:44 +0000
+++ b/mysql-test/lib/mtr_cases.pm	2009-01-21 10:17:16 +0000
@@ -45,10 +45,13 @@ our $reorder= 1;
 sub collect_option {
   my ($opt, $value)= @_;
 
+  # Evaluate $opt as string to use "Getopt::Long::Callback legacy API"
+  my $opt_name = "$opt";
+
   # Convert - to _ in option name
-  $opt =~ s/-/_/g;
+  $opt_name =~ s/-/_/g;
   no strict 'refs';
-  ${$opt}= $value;
+  ${$opt_name}= $value;
 }
 
 use File::Basename;

=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm	2009-01-08 19:03:56 +0000
+++ b/mysql-test/lib/mtr_report.pm	2009-01-21 10:17:16 +0000
@@ -44,12 +44,13 @@ our $timer= 1;
 sub report_option {
   my ($opt, $value)= @_;
 
+  # Evaluate $opt as string to use "Getopt::Long::Callback legacy API"
+  my $opt_name = "$opt";
+
   # Convert - to _ in option name
-  $opt =~ s/-/_/g;
+  $opt_name =~ s/-/_/g;
   no strict 'refs';
-  ${$opt}= $value;
-
-  #print $name, " setting $opt to ", (defined $value? $value : "undef") ,"\n";
+  ${$opt_name}= $value;
 }
 
 sub _name {

Thread
bzr commit into mysql-5.1 branch (msvensson:2714) Bug#39972Magnus Svensson21 Jan