Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
2b748a0d
Commit
2b748a0d
authored
Jun 27, 2007
by
msvensson@pilot.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0-maint
into pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
parents
c9eb25a2
5c3273f1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
12 deletions
+41
-12
mysql-test/lib/mtr_process.pl
mysql-test/lib/mtr_process.pl
+16
-1
mysql-test/lib/mtr_timer.pl
mysql-test/lib/mtr_timer.pl
+7
-2
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+18
-9
No files found.
mysql-test/lib/mtr_process.pl
View file @
2b748a0d
...
@@ -611,6 +611,11 @@ sub mtr_check_stop_servers ($) {
...
@@ -611,6 +611,11 @@ sub mtr_check_stop_servers ($) {
if
(
$pid
)
if
(
$pid
)
{
{
# Server is still alive, put it in list to be hard killed
# Server is still alive, put it in list to be hard killed
if
(
$::glob_win32_perl
)
{
# Kill the real process if it's known
$pid
=
$srv
->
{'
real_pid
'}
if
(
$srv
->
{'
real_pid
'});
}
$kill_pids
{
$pid
}
=
1
;
$kill_pids
{
$pid
}
=
1
;
# Write a message to the process's error log (if it has one)
# Write a message to the process's error log (if it has one)
...
@@ -664,6 +669,16 @@ sub mtr_check_stop_servers ($) {
...
@@ -664,6 +669,16 @@ sub mtr_check_stop_servers ($) {
}
}
}
}
if
(
$::glob_win32_perl
and
$srv
->
{'
real_pid
'})
{
# Wait for the pseudo pid - if the real_pid was known
# the pseudo pid has not been waited for yet, wai blocking
# since it's "such a simple program"
mtr_verbose
("
Wait for pseudo process
$srv
->{'pid'}
");
my
$ret_pid
=
waitpid
(
$srv
->
{'
pid
'},
0
);
mtr_verbose
("
Pseudo process
$ret_pid
died
");
}
$srv
->
{'
pid
'}
=
0
;
$srv
->
{'
pid
'}
=
0
;
}
}
}
}
...
@@ -1041,7 +1056,7 @@ sub sleep_until_file_created ($$$) {
...
@@ -1041,7 +1056,7 @@ sub sleep_until_file_created ($$$) {
{
{
if
(
-
r
$pidfile
)
if
(
-
r
$pidfile
)
{
{
return
$pid
;
return
1
;
}
}
# Check if it died after the fork() was successful
# Check if it died after the fork() was successful
...
...
mysql-test/lib/mtr_timer.pl
View file @
2b748a0d
...
@@ -97,9 +97,14 @@ sub mtr_timer_start($$$) {
...
@@ -97,9 +97,14 @@ sub mtr_timer_start($$$) {
# clearing the signal handler.
# clearing the signal handler.
$SIG
{
INT
}
=
'
DEFAULT
';
$SIG
{
INT
}
=
'
DEFAULT
';
$SIG
{
TERM
}
=
sub
{
mtr_verbose
("
timer woke up, exiting!
");
exit
(
0
);
};
$0
=
"
mtr_timer(timers,
$name
,
$duration
)
";
$0
=
"
mtr_timer(timers,
$name
,
$duration
)
";
mtr_verbose
("
timer child
$name
, sleep
$duration
");
sleep
(
$duration
);
sleep
(
$duration
);
mtr_verbose
("
timer expired after
$duration
seconds
");
exit
(
0
);
exit
(
0
);
}
}
}
}
...
@@ -118,7 +123,7 @@ sub mtr_timer_stop ($$) {
...
@@ -118,7 +123,7 @@ sub mtr_timer_stop ($$) {
# FIXME as Cygwin reuses pids fast, maybe check that is
# FIXME as Cygwin reuses pids fast, maybe check that is
# the expected process somehow?!
# the expected process somehow?!
kill
(
9
,
$tpid
);
kill
(
15
,
$tpid
);
# As the timers are so simple programs, we trust them to terminate,
# As the timers are so simple programs, we trust them to terminate,
# and use blocking wait for it. We wait just to avoid a zombie.
# and use blocking wait for it. We wait just to avoid a zombie.
...
...
mysql-test/mysql-test-run.pl
View file @
2b748a0d
...
@@ -2579,10 +2579,19 @@ sub ndbcluster_wait_started($$){
...
@@ -2579,10 +2579,19 @@ sub ndbcluster_wait_started($$){
sub
mysqld_wait_started
($){
sub
mysqld_wait_started
($){
my
$mysqld
=
shift
;
my
$mysqld
=
shift
;
my
$res
=
sleep_until_file_created
(
$mysqld
->
{'
path_pid
'},
if
(
sleep_until_file_created
(
$mysqld
->
{'
path_pid
'},
$mysqld
->
{'
start_timeout
'},
$mysqld
->
{'
start_timeout
'},
$mysqld
->
{'
pid
'});
$mysqld
->
{'
pid
'})
==
0
)
return
$res
==
0
;
{
# Failed to wait for pid file
return
1
;
}
# Get the "real pid" of the process, it will be used for killing
# the process in ActiveState's perl on windows
$mysqld
->
{'
real_pid
'}
=
mtr_get_pid_from_file
(
$mysqld
->
{'
path_pid
'});
return
0
;
}
}
...
@@ -3720,7 +3729,6 @@ sub mysqld_arguments ($$$$) {
...
@@ -3720,7 +3729,6 @@ sub mysqld_arguments ($$$$) {
mtr_add_arg
(
$args
,
"
%s--no-defaults
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--no-defaults
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--console
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--basedir=%s
",
$prefix
,
$path_my_basedir
);
mtr_add_arg
(
$args
,
"
%s--basedir=%s
",
$prefix
,
$path_my_basedir
);
mtr_add_arg
(
$args
,
"
%s--character-sets-dir=%s
",
$prefix
,
$path_charsetsdir
);
mtr_add_arg
(
$args
,
"
%s--character-sets-dir=%s
",
$prefix
,
$path_charsetsdir
);
...
@@ -4093,6 +4101,7 @@ sub stop_all_servers () {
...
@@ -4093,6 +4101,7 @@ sub stop_all_servers () {
push
(
@kill_pids
,{
push
(
@kill_pids
,{
pid
=>
$mysqld
->
{'
pid
'},
pid
=>
$mysqld
->
{'
pid
'},
real_pid
=>
$mysqld
->
{'
real_pid
'},
pidfile
=>
$mysqld
->
{'
path_pid
'},
pidfile
=>
$mysqld
->
{'
path_pid
'},
sockfile
=>
$mysqld
->
{'
path_sock
'},
sockfile
=>
$mysqld
->
{'
path_sock
'},
port
=>
$mysqld
->
{'
port
'},
port
=>
$mysqld
->
{'
port
'},
...
@@ -4300,6 +4309,7 @@ sub run_testcase_stop_servers($$$) {
...
@@ -4300,6 +4309,7 @@ sub run_testcase_stop_servers($$$) {
push
(
@kill_pids
,{
push
(
@kill_pids
,{
pid
=>
$mysqld
->
{'
pid
'},
pid
=>
$mysqld
->
{'
pid
'},
real_pid
=>
$mysqld
->
{'
real_pid
'},
pidfile
=>
$mysqld
->
{'
path_pid
'},
pidfile
=>
$mysqld
->
{'
path_pid
'},
sockfile
=>
$mysqld
->
{'
path_sock
'},
sockfile
=>
$mysqld
->
{'
path_sock
'},
port
=>
$mysqld
->
{'
port
'},
port
=>
$mysqld
->
{'
port
'},
...
@@ -4351,6 +4361,7 @@ sub run_testcase_stop_servers($$$) {
...
@@ -4351,6 +4361,7 @@ sub run_testcase_stop_servers($$$) {
push
(
@kill_pids
,{
push
(
@kill_pids
,{
pid
=>
$mysqld
->
{'
pid
'},
pid
=>
$mysqld
->
{'
pid
'},
real_pid
=>
$mysqld
->
{'
real_pid
'},
pidfile
=>
$mysqld
->
{'
path_pid
'},
pidfile
=>
$mysqld
->
{'
path_pid
'},
sockfile
=>
$mysqld
->
{'
path_sock
'},
sockfile
=>
$mysqld
->
{'
path_sock
'},
port
=>
$mysqld
->
{'
port
'},
port
=>
$mysqld
->
{'
port
'},
...
@@ -4775,12 +4786,10 @@ sub run_mysqltest ($) {
...
@@ -4775,12 +4786,10 @@ sub run_mysqltest ($) {
mtr_add_arg
(
$args
,
"
%s
",
$_
)
for
@args_saved
;
mtr_add_arg
(
$args
,
"
%s
",
$_
)
for
@args_saved
;
}
}
mtr_add_arg
(
$args
,
"
--test-file
");
mtr_add_arg
(
$args
,
"
--test-file=%s
",
$tinfo
->
{'
path
'});
mtr_add_arg
(
$args
,
$tinfo
->
{'
path
'});
if
(
defined
$tinfo
->
{'
result_file
'}
)
{
if
(
defined
$tinfo
->
{'
result_file
'}
)
{
mtr_add_arg
(
$args
,
"
--result-file
");
mtr_add_arg
(
$args
,
"
--result-file=%s
",
$tinfo
->
{'
result_file
'});
mtr_add_arg
(
$args
,
$tinfo
->
{'
result_file
'});
}
}
if
(
$opt_record
)
if
(
$opt_record
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment