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
c243c7d8
Commit
c243c7d8
authored
Oct 04, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up de_before_start_master/slave
parent
c29427ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
36 deletions
+21
-36
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+21
-36
No files found.
mysql-test/mysql-test-run.pl
View file @
c243c7d8
...
@@ -360,8 +360,8 @@ sub run_testcase_stop_servers ($$$);
...
@@ -360,8 +360,8 @@ sub run_testcase_stop_servers ($$$);
sub
run_testcase_start_servers
($);
sub
run_testcase_start_servers
($);
sub
run_testcase_check_skip_test
($);
sub
run_testcase_check_skip_test
($);
sub
report_failure_and_restart
($);
sub
report_failure_and_restart
($);
sub
do_before_start_master
($
$
);
sub
do_before_start_master
($);
sub
do_before_start_slave
($
$
);
sub
do_before_start_slave
($);
sub
ndbd_start
($$$);
sub
ndbd_start
($$$);
sub
ndb_mgmd_start
($);
sub
ndb_mgmd_start
($);
sub
mysqld_start
($$$);
sub
mysqld_start
($$$);
...
@@ -2866,25 +2866,18 @@ sub report_failure_and_restart ($) {
...
@@ -2866,25 +2866,18 @@ sub report_failure_and_restart ($) {
##############################################################################
##############################################################################
# The embedded server needs the cleanup so we do some of the start work
sub
do_before_start_master
($)
{
# but stop before actually running mysqld or anything.
my
(
$tinfo
)
=
@_
;
sub
do_before_start_master
($$)
{
my
$tname
=
shift
;
my
$tname
=
$tinfo
->
{'
name
'}
;
my
$init_script
=
shift
;
my
$init_script
=
$tinfo
->
{'
master_sh
'}
;
# FIXME what about second master.....
# FIXME what about second master.....
# Remove stale binary logs except for 2 tests which need them FIXME here????
if
(
$tname
ne
"
rpl_crash_binlog_ib_1b
"
and
$tname
ne
"
rpl_crash_binlog_ib_2b
"
and
$tname
ne
"
rpl_crash_binlog_ib_3b
")
{
# FIXME we really want separate dir for binlogs
foreach
my
$bin
(
glob
("
$opt_vardir
/log/master*-bin*
")
)
foreach
my
$bin
(
glob
("
$opt_vardir
/log/master*-bin*
")
)
{
{
unlink
(
$bin
);
unlink
(
$bin
);
}
}
}
# FIXME only remove the ones that are tied to this master
# FIXME only remove the ones that are tied to this master
# Remove old master.info and relay-log.info files
# Remove old master.info and relay-log.info files
...
@@ -2903,30 +2896,22 @@ sub do_before_start_master ($$) {
...
@@ -2903,30 +2896,22 @@ sub do_before_start_master ($$) {
# mtr_warning("$init_script exited with code $ret");
# mtr_warning("$init_script exited with code $ret");
}
}
}
}
# for gcov FIXME needed? If so we need more absolute paths
# chdir($glob_basedir);
}
}
sub
do_before_start_slave
($$)
{
sub
do_before_start_slave
($)
{
my
$tname
=
shift
;
my
(
$tinfo
)
=
@_
;
my
$init_script
=
shift
;
my
$tname
=
$tinfo
->
{'
name
'};
my
$init_script
=
$tinfo
->
{'
master_sh
'};
# Remove stale binary logs and old master.info files
# except for too tests which need them
if
(
$tname
ne
"
rpl_crash_binlog_ib_1b
"
and
$tname
ne
"
rpl_crash_binlog_ib_2b
"
and
$tname
ne
"
rpl_crash_binlog_ib_3b
"
)
{
# FIXME we really want separate dir for binlogs
foreach
my
$bin
(
glob
("
$opt_vardir
/log/slave*-bin*
")
)
foreach
my
$bin
(
glob
("
$opt_vardir
/log/slave*-bin*
")
)
{
{
unlink
(
$bin
);
unlink
(
$bin
);
}
}
# FIXME really master?!
unlink
("
$slave
->[0]->{'path_myddir'}/master.info
");
unlink
("
$slave
->[0]->{'path_myddir'}/master.info
");
unlink
("
$slave
->[0]->{'path_myddir'}/relay-log.info
");
unlink
("
$slave
->[0]->{'path_myddir'}/relay-log.info
");
}
# Run slave initialization shell script if one exists
# Run slave initialization shell script if one exists
if
(
$init_script
)
if
(
$init_script
)
...
@@ -3687,7 +3672,7 @@ sub run_testcase_start_servers($) {
...
@@ -3687,7 +3672,7 @@ sub run_testcase_start_servers($) {
if
(
!
$master
->
[
0
]
->
{'
pid
'}
)
if
(
!
$master
->
[
0
]
->
{'
pid
'}
)
{
{
# Master mysqld is not started
# Master mysqld is not started
do_before_start_master
(
$t
name
,
$tinfo
->
{'
master_sh
'}
);
do_before_start_master
(
$t
info
);
mysqld_start
(
$master
->
[
0
],
$tinfo
->
{'
master_opt
'},
[]
);
mysqld_start
(
$master
->
[
0
],
$tinfo
->
{'
master_opt
'},
[]
);
...
@@ -3752,7 +3737,7 @@ sub run_testcase_start_servers($) {
...
@@ -3752,7 +3737,7 @@ sub run_testcase_start_servers($) {
restore_slave_databases
(
$tinfo
->
{'
slave_num
'});
restore_slave_databases
(
$tinfo
->
{'
slave_num
'});
do_before_start_slave
(
$t
name
,
$tinfo
->
{'
slave_sh
'}
);
do_before_start_slave
(
$t
info
);
if
(
!
$opt_skip_ndbcluster_slave
and
if
(
!
$opt_skip_ndbcluster_slave
and
!
$clusters
->
[
1
]
->
{'
pid
'}
and
!
$clusters
->
[
1
]
->
{'
pid
'}
and
...
...
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