diff options
author | John H. Embretsen <john.embretsen@oracle.com> | 2011-01-27 12:38:13 +0100 |
---|---|---|
committer | John H. Embretsen <john.embretsen@oracle.com> | 2011-01-27 12:38:13 +0100 |
commit | 9c2370c25adc30c5fae8ad8854b401275b033210 (patch) | |
tree | 731531e8dc9d53d279c572ece74d04283ad6a823 /mysql-test/mysql-test-run.pl | |
parent | 29484d7a66767251666becb7bfc4cf8cead7756f (diff) | |
parent | 479a91da4e7e00d7cbf3f1359a878993db8e3675 (diff) | |
download | mariadb-git-9c2370c25adc30c5fae8ad8854b401275b033210.tar.gz |
Merge two patches for bug 56895 into tip of mysql-5.1 branch.
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index a8a05ee730d..03dd3e5bd3f 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -13,10 +13,9 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # ############################################################################## @@ -4096,8 +4095,10 @@ sub check_expected_crash_and_restart { { mtr_verbose("Crash was expected, file '$expect_file' exists"); - for (my $waits = 0; $waits < 50; $waits++) + for (my $waits = 0; $waits < 50; mtr_milli_sleep(100), $waits++) { + # Race condition seen on Windows: try again until file not empty + next if -z $expect_file; # If last line in expect file starts with "wait" # sleep a little and try again, thus allowing the # test script to control when the server should start @@ -4106,10 +4107,11 @@ sub check_expected_crash_and_restart { if ($last_line =~ /^wait/ ) { mtr_verbose("Test says wait before restart") if $waits == 0; - mtr_milli_sleep(100); next; } + # Ignore any partial or unknown command + next unless $last_line =~ /^restart/; # If last line begins "restart:", the rest of the line is read as # extra command line options to add to the restarted mysqld. # Anything other than 'wait' or 'restart:' (with a colon) will @@ -4474,6 +4476,8 @@ sub mysqld_start ($$) { my @all_opts= @$extra_opts; if (exists $mysqld->{'restart_opts'}) { push (@all_opts, @{$mysqld->{'restart_opts'}}); + mtr_verbose(My::Options::toStr("mysqld_start restart", + @{$mysqld->{'restart_opts'}})); } mysqld_arguments($args,$mysqld,\@all_opts); |