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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
da6773f9
Commit
da6773f9
authored
Dec 20, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Count number of masters the test is actually using and only start as
many as neeeded
parent
5ccd3608
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
mysql-test/lib/mtr_cases.pl
mysql-test/lib/mtr_cases.pl
+2
-5
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+20
-6
No files found.
mysql-test/lib/mtr_cases.pl
View file @
da6773f9
...
...
@@ -288,6 +288,7 @@ sub collect_one_test_case($$$$$$$) {
$tinfo
->
{'
timezone
'}
=
"
GMT-3
";
# for UNIX_TIMESTAMP tests to work
$tinfo
->
{'
slave_num
'}
=
0
;
# Default, no slave
$tinfo
->
{'
master_num
'}
=
1
;
# Default, 1 master
if
(
defined
mtr_match_prefix
(
$tname
,"
rpl
")
)
{
if
(
$::opt_skip_rpl
)
...
...
@@ -297,13 +298,8 @@ sub collect_one_test_case($$$$$$$) {
return
;
}
$tinfo
->
{'
slave_num
'}
=
1
;
# Default for rpl* tests, use one slave
if
(
$tname
eq
'
rpl_failsafe
'
or
$tname
eq
'
rpl_chain_temp_table
'
)
{
# $tinfo->{'slave_num'}= 3; # Not 3 ? Check old code, strange
}
}
if
(
defined
mtr_match_prefix
(
$tname
,"
federated
")
)
...
...
@@ -582,6 +578,7 @@ our @tags=
["
include/have_debug.inc
",
"
need_debug
",
1
],
["
include/have_ndb.inc
",
"
ndb_test
",
1
],
["
include/have_ndb_extra.inc
",
"
ndb_extra
",
1
],
["
include/have_multi_ndb.inc
",
"
master_num
",
2
],
["
require_manager
",
"
require_manager
",
1
],
);
...
...
mysql-test/mysql-test-run.pl
View file @
da6773f9
...
...
@@ -227,6 +227,7 @@ our $opt_mark_progress;
our
$opt_skip
;
our
$opt_skip_rpl
;
our
$max_slave_num
=
0
;
our
$max_master_num
=
0
;
our
$use_innodb
;
our
$opt_skip_test
;
our
$opt_skip_im
;
...
...
@@ -404,6 +405,15 @@ sub main () {
$max_slave_num
=
$test
->
{
slave_num
};
mtr_error
("
Too many slaves
")
if
$max_slave_num
>
3
;
}
# Count max number of masters used by a test case
if
(
$test
->
{
master_num
}
>
$max_master_num
)
{
$max_master_num
=
$test
->
{
master_num
};
mtr_error
("
Too many masters
")
if
$max_master_num
>
2
;
mtr_error
("
Too few masters
")
if
$max_master_num
<
1
;
}
$use_innodb
||=
$test
->
{'
innodb_test
'};
}
...
...
@@ -1235,9 +1245,10 @@ sub command_line_setup () {
sub
datadir_list_setup
()
{
# Make a list of all data_dirs
@data_dir_lst
=
(
$master
->
[
0
]
->
{'
path_myddir
'},
$master
->
[
1
]
->
{'
path_myddir
'});
for
(
my
$idx
=
0
;
$idx
<
$max_master_num
;
$idx
++
)
{
push
(
@data_dir_lst
,
$master
->
[
$idx
]
->
{'
path_myddir
'});
}
for
(
my
$idx
=
0
;
$idx
<
$max_slave_num
;
$idx
++
)
{
...
...
@@ -2644,8 +2655,10 @@ sub mysql_install_db () {
install_db
('
master
',
$master
->
[
0
]
->
{'
path_myddir
'});
# FIXME check if testcase really is using second master
copy_install_db
('
master
',
$master
->
[
1
]
->
{'
path_myddir
'});
if
(
$max_master_num
)
{
copy_install_db
('
master
',
$master
->
[
1
]
->
{'
path_myddir
'});
}
# Install the number of slave databses needed
for
(
my
$idx
=
0
;
$idx
<
$max_slave_num
;
$idx
++
)
...
...
@@ -4179,7 +4192,8 @@ sub run_testcase_start_servers($) {
}
if
(
$clusters
->
[
0
]
->
{'
pid
'}
and
!
$master
->
[
1
]
->
{'
pid
'}
)
if
(
$clusters
->
[
0
]
->
{'
pid
'}
and
!
$master
->
[
1
]
->
{'
pid
'}
and
$tinfo
->
{'
master_num
'}
>
1
)
{
# Test needs cluster, start an extra mysqld connected to cluster
...
...
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