summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_io.pl
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2005-02-03 21:13:27 +0100
committerunknown <kent@mysql.com>2005-02-03 21:13:27 +0100
commit044f9e8227d1aa1e41e83a3a89e162b429a6646b (patch)
tree955cc0efc6c8a116ae643539da0919be43195ade /mysql-test/lib/mtr_io.pl
parente244a3a9b4a9d9fd9dad63338ead667cf4b9a959 (diff)
downloadmariadb-git-044f9e8227d1aa1e41e83a3a89e162b429a6646b.tar.gz
mysql-test-run.pl:
Let --start-and-exit actually start a server Added that test case names can be specified on the comman line Added embedded server support Added environment variables UMASK, UMASK_DIR Added missing MASTER_MYSOCK1, MASTER_MYPORT1, USE_RUNNING_SERVER Added missing CHARSETSDIR, MYSQL_FIX_SYSTEM_TABLES, MYSQL_CLIENT_TEST Pass on return value from sleep_until_file_created(), to fail test Fail test if early termination of mysqld servers Create intial databases for the second master, and two additional slaves mtr_process.pl: Find out if port is still in use, using simple TCP connect Use non blocking waitpid() to catch terminations early Make a special case spawning the 'mysqltest' application Redo the fork() if it returns EAGAIN Make sure to record if master or slave terminated Improved debugging output Improved code that remove PID files to avoid race Abort if we can't stop all mysqld servers using our ports Many improvements in killing mysqld servers Let sleep_until_file_created() catch if server died early mtr_report.pl: Added option to disable test cases using <testcase>.disabled file If --timer, only try to open file with time data if it exists mtr_io.pl: Remove starting/ending space reading server options from file mysql-test/lib/mtr_io.pl: Remove starting/ending space reading server options from file mysql-test/lib/mtr_report.pl: Added option to disable test cases using <testcase>.disabled file If --timer, only try to open file with time data if it exists mysql-test/lib/mtr_process.pl: Find out if port is still in use, using simple TCP connect Use non blocking waitpid() to catch terminations early Make a special case spawning the 'mysqltest' application Redo the fork() if it returns EAGAIN Make sure to record if master or slave terminated Improved debugging output Improved code that remove PID files to avoid race Abort if we can't stop all mysqld servers using our ports Many improvements in killing mysqld servers Let sleep_until_file_created() catch if server died early mysql-test/mysql-test-run.pl: Let --start-and-exit actually start a server Added that test case names can be specified on the comman line Added embedded server support Added environment variables UMASK, UMASK_DIR Added missing MASTER_MYSOCK1, MASTER_MYPORT1, USE_RUNNING_SERVER Added missing CHARSETSDIR, MYSQL_FIX_SYSTEM_TABLES, MYSQL_CLIENT_TEST Pass on return value from sleep_until_file_created(), to fail test Fail test if early termination of mysqld servers Create intial databases for the second master, and two additional slaves
Diffstat (limited to 'mysql-test/lib/mtr_io.pl')
-rw-r--r--mysql-test/lib/mtr_io.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysql-test/lib/mtr_io.pl b/mysql-test/lib/mtr_io.pl
index 017ba11645b..b3da6d97664 100644
--- a/mysql-test/lib/mtr_io.pl
+++ b/mysql-test/lib/mtr_io.pl
@@ -8,6 +8,7 @@ use strict;
sub mtr_get_pid_from_file ($);
sub mtr_get_opts_from_file ($);
+sub mtr_fromfile ($);
sub mtr_tofile ($@);
sub mtr_tonewfile($@);
@@ -107,6 +108,8 @@ sub mtr_fromfile ($) {
open(FILE,"<",$file) or mtr_error("can't open file \"$file\": $!");
my $text= join('', <FILE>);
close FILE;
+ $text =~ s/^\s+//; # Remove starting space, incl newlines
+ $text =~ s/\s+$//; # Remove ending space, incl newlines
return $text;
}