1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

Make events_restart more stable by waiting for the server to be stopped before starting it again

This commit is contained in:
Magnus Svensson
2008-08-09 11:16:12 +02:00
parent 02e48e886f
commit 66b42a13f2
4 changed files with 47 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ sub mtr_tonewfile($@);
sub mtr_appendfile_to_file ($$);
sub mtr_grab_file($);
sub mtr_printfile($);
sub mtr_lastlinefromfile ($);
# Read a whole file, stripping leading and trailing whitespace.
sub mtr_fromfile ($) {
@@ -94,5 +94,17 @@ sub mtr_printfile($) {
return;
}
sub mtr_lastlinefromfile ($) {
my $file= shift;
my $text;
open(FILE,"<",$file) or mtr_error("can't open file \"$file\": $!");
while (my $line= <FILE>)
{
$text= $line;
}
close FILE;
return $text;
}
1;