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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user