From: Bjorn Munch Date: January 28 2011 3:43pm Subject: bzr push into mysql-5.5-mtr branch (bjorn.munch:3159 to 3160) Bug#59148 List-Archive: http://lists.mysql.com/commits/129894 X-Bug: 59148 Message-Id: <201101281543.p0SFh149017863@khepri15.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3160 Bjorn Munch 2011-01-28 Bug #59148 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries Do as mysqld_safe: if running mysqld-debug, plugins are in debug subdirs NB mtr --debug won't work in this context until 47141 is fixed Also moved read_plugin_defs; no point running this in all worker threads modified: mysql-test/mysql-test-run.pl 3159 Bjorn Munch 2011-01-27 Bug #59489 Enable setting of env. variables for mysqld from mtr Added --mysqld-env option, propagate via safe_process Simplified: should be safe to set in parent safe_process after it's started Addendum: catch cases of --mysqld-env w/o value, assume env.var name never begins with "--" modified: mysql-test/lib/My/SafeProcess.pm mysql-test/lib/My/SafeProcess/safe_process.cc mysql-test/lib/My/SafeProcess/safe_process_win.cc mysql-test/mysql-test-run.pl === modified file 'mysql-test/mysql-test-run.pl' --- a/mysql-test/mysql-test-run.pl 2011-01-27 13:42:08 +0000 +++ b/mysql-test/mysql-test-run.pl 2011-01-28 14:55:50 +0000 @@ -417,6 +417,14 @@ sub main { my $server_port = $server->sockport(); mtr_report("Using server port $server_port"); + # -------------------------------------------------------------------------- + # Read definitions from include/plugin.defs + # + read_plugin_defs("include/plugin.defs"); + + # Simplify reference to semisync plugins + $ENV{'SEMISYNC_PLUGIN_OPT'}= $ENV{'SEMISYNC_MASTER_PLUGIN_OPT'}; + # Create child processes my %children; for my $child_num (1..$opt_parallel){ @@ -1973,7 +1981,7 @@ sub find_plugin($$) { my ($plugin, $location) = @_; my $plugin_filename; - + if (IS_WINDOWS) { $plugin_filename = $plugin.".dll"; @@ -1983,13 +1991,13 @@ sub find_plugin($$) $plugin_filename = $plugin.".so"; } - my $lib_example_plugin= + my $lib_plugin= mtr_file_exists(vs_config_dirs($location,$plugin_filename), "$basedir/lib/plugin/".$plugin_filename, "$basedir/$location/.libs/".$plugin_filename, "$basedir/lib/mysql/plugin/".$plugin_filename, ); - return $lib_example_plugin; + return $lib_plugin; } # @@ -1999,10 +2007,16 @@ sub find_plugin($$) sub read_plugin_defs($) { my ($defs_file)= @_; + my $running_debug= 0; open(PLUGDEF, '<', $defs_file) or mtr_error("Can't read plugin defintions file $defs_file"); + # Need to check if we will be running mysqld-debug + if ($opt_debug) { + $running_debug= 1 if find_mysqld($basedir) =~ /-debug$/; + } + while () { next if /^#/; my ($plug_file, $plug_loc, $plug_var, $plug_names)= split; @@ -2010,6 +2024,9 @@ sub read_plugin_defs($) next unless $plug_file; mtr_error("Lines in $defs_file must have 3 or 4 items") unless $plug_var; + # If running debug server, plugins will be in 'debug' subdirectory + $plug_file= "debug/$plug_file" if $running_debug; + my ($plugin)= find_plugin($plug_file, $plug_loc); # Set env. variables that tests may use, set to empty if plugin @@ -2074,19 +2091,10 @@ sub environment_setup { push(@ld_library_paths, "$basedir/storage/ndb/src/.libs"); } - # -------------------------------------------------------------------------- - # Read definitions from include/plugin.defs - # # Plugin settings should no longer be added here, instead # place definitions in include/plugin.defs. # See comment in that file for details. # -------------------------------------------------------------------------- - read_plugin_defs("include/plugin.defs"); - - # Simplify reference to semisync plugins - $ENV{'SEMISYNC_PLUGIN_OPT'}= $ENV{'SEMISYNC_MASTER_PLUGIN_OPT'}; - - # -------------------------------------------------------------------------- # Valgrind need to be run with debug libraries otherwise it's almost # impossible to add correct supressions, that means if "/usr/lib/debug" # is available, it should be added to No bundle (reason: useless for push emails).