From 641baa5d03131ba528d5e6a36da3514f5c9b8ab2 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Thu, 31 Aug 2017 14:22:05 +0300 Subject: [PATCH] Post-push for MDEV-13437 A new $MYSQLD_LAST_CMD evaluation was too late in case --manual-gdb. Now it is done before the server restart type branches which is safe and the args value has been fully computed by the new point of evaluation. --- mysql-test/mysql-test-run.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 1848b74eb0f..ed010cdf818 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -5477,6 +5477,11 @@ sub mysqld_start ($$) { } } + # "Dynamic" version of MYSQLD_CMD is reevaluated with each mysqld_start. + # Use it to restart the server at testing a failing server start (e.g + # due to incompatible options). + $ENV{'MYSQLD_LAST_CMD'}= "$exe @$args"; + if ( $opt_gdb || $opt_manual_gdb ) { gdb_arguments(\$args, \$exe, $mysqld->name()); @@ -5573,11 +5578,6 @@ sub mysqld_start ($$) { # Remember options used when starting $mysqld->{'started_opts'}= $extra_opts; - # "Dynamic" version of MYSQLD_CMD is reevaluated with each mysqld_start. - # Use it to restart the server at testing a failing server start (e.g - # due to incompatible options). - $ENV{'MYSQLD_LAST_CMD'}= "$exe @$args"; - return; }