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
f0c4aba7
Commit
f0c4aba7
authored
Aug 25, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport from 5.0 a fix that will start ndb only for tests that needs it
parent
31aa9667
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
2 deletions
+65
-2
mysql-test/lib/mtr_cases.pl
mysql-test/lib/mtr_cases.pl
+22
-0
mysql-test/lib/mtr_match.pl
mysql-test/lib/mtr_match.pl
+17
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+26
-2
No files found.
mysql-test/lib/mtr_cases.pl
View file @
f0c4aba7
...
@@ -193,6 +193,28 @@ sub collect_one_test_case($$$$$$) {
...
@@ -193,6 +193,28 @@ sub collect_one_test_case($$$$$$) {
$tinfo
->
{'
slave_restart
'}
=
1
;
$tinfo
->
{'
slave_restart
'}
=
1
;
}
}
# Cluster is needed by test case if testname contains ndb
if
(
defined
mtr_match_substring
(
$tname
,"
ndb
")
)
{
$tinfo
->
{'
ndb_test
'}
=
1
;
if
(
$::opt_skip_ndbcluster
)
{
# Skip all ndb tests
$tinfo
->
{'
skip
'}
=
1
;
return
;
}
if
(
!
$::opt_with_ndbcluster
)
{
# Ndb is not supported, skip them
$tinfo
->
{'
skip
'}
=
1
;
return
;
}
}
else
{
$tinfo
->
{'
ndb_test
'}
=
0
;
}
# FIXME what about embedded_server + ndbcluster, skip ?!
# FIXME what about embedded_server + ndbcluster, skip ?!
my
$master_opt_file
=
"
$testdir
/
$tname
-master.opt
";
my
$master_opt_file
=
"
$testdir
/
$tname
-master.opt
";
...
...
mysql-test/lib/mtr_match.pl
View file @
f0c4aba7
...
@@ -50,6 +50,23 @@ sub mtr_match_extension ($$) {
...
@@ -50,6 +50,23 @@ sub mtr_match_extension ($$) {
}
}
# Match a substring anywere in a string
sub
mtr_match_substring
($$)
{
my
$string
=
shift
;
my
$substring
=
shift
;
if
(
$string
=~
/(.*)\Q$substring\E(.*)$/
)
# strncmp
{
return
$1
;
}
else
{
return
undef
;
# NULL
}
}
sub
mtr_match_any_exact
($$)
{
sub
mtr_match_any_exact
($$)
{
my
$string
=
shift
;
my
$string
=
shift
;
my
$mlist
=
shift
;
my
$mlist
=
shift
;
...
...
mysql-test/mysql-test-run.pl
View file @
f0c4aba7
...
@@ -1581,6 +1581,16 @@ sub run_testcase ($) {
...
@@ -1581,6 +1581,16 @@ sub run_testcase ($) {
{
{
$do_restart
=
1
;
# Always restart if script to run
$do_restart
=
1
;
# Always restart if script to run
}
}
elsif
(
$tinfo
->
{'
ndb_test
'}
and
$master
->
[
0
]
->
{'
ndbcluster
'}
==
1
)
{
$do_restart
=
1
;
# Restart with cluster
# print "Restarting because cluster need to be enabled\n";
}
elsif
(
$tinfo
->
{'
ndb_test
'}
==
0
and
$master
->
[
0
]
->
{'
ndbcluster
'}
==
0
)
{
$do_restart
=
1
;
# Restart without cluster
# print "Restarting because cluster need to be disabled\n";
}
elsif
(
$master
->
[
0
]
->
{'
running_master_is_special
'}
and
elsif
(
$master
->
[
0
]
->
{'
running_master_is_special
'}
and
$master
->
[
0
]
->
{'
running_master_is_special
'}
->
{'
timezone
'}
eq
$master
->
[
0
]
->
{'
running_master_is_special
'}
->
{'
timezone
'}
eq
$tinfo
->
{'
timezone
'}
and
$tinfo
->
{'
timezone
'}
and
...
@@ -1646,7 +1656,7 @@ sub run_testcase ($) {
...
@@ -1646,7 +1656,7 @@ sub run_testcase ($) {
if
(
!
$opt_local_master
)
if
(
!
$opt_local_master
)
{
{
if
(
$master
->
[
0
]
->
{'
ndbcluster
'}
)
if
(
$master
->
[
0
]
->
{'
ndbcluster
'}
&&
$tinfo
->
{'
ndb_test
'}
)
{
{
$master
->
[
0
]
->
{'
ndbcluster
'}
=
ndbcluster_start
();
$master
->
[
0
]
->
{'
ndbcluster
'}
=
ndbcluster_start
();
if
(
$master
->
[
0
]
->
{'
ndbcluster
'}
)
if
(
$master
->
[
0
]
->
{'
ndbcluster
'}
)
...
@@ -1659,8 +1669,22 @@ sub run_testcase ($) {
...
@@ -1659,8 +1669,22 @@ sub run_testcase ($) {
{
{
# FIXME not correct location for do_before_start_master()
# FIXME not correct location for do_before_start_master()
do_before_start_master
(
$tname
,
$tinfo
->
{'
master_sh
'});
do_before_start_master
(
$tname
,
$tinfo
->
{'
master_sh
'});
# Save skip_ndbcluster
my
$save_opt_skip_ndbcluster
=
$opt_skip_ndbcluster
;
if
(
!
$tinfo
->
{'
ndb_test
'})
{
# Modify skip_ndbcluster so cluster is skipped for this
# and subsequent testcases(until we find one that does not cluster)
$opt_skip_ndbcluster
=
1
;
}
$master
->
[
0
]
->
{'
pid
'}
=
$master
->
[
0
]
->
{'
pid
'}
=
mysqld_start
('
master
',
0
,
$tinfo
->
{'
master_opt
'},
[]
);
mysqld_start
('
master
',
0
,
$tinfo
->
{'
master_opt
'},
[]
);
# Restore skip_ndbcluster
$opt_skip_ndbcluster
=
$save_opt_skip_ndbcluster
;
if
(
!
$master
->
[
0
]
->
{'
pid
'}
)
if
(
!
$master
->
[
0
]
->
{'
pid
'}
)
{
{
report_failure_and_restart
(
$tinfo
);
report_failure_and_restart
(
$tinfo
);
...
@@ -2026,7 +2050,7 @@ sub mysqld_arguments ($$$$$) {
...
@@ -2026,7 +2050,7 @@ sub mysqld_arguments ($$$$$) {
}
}
}
}
if
(
$opt_with_ndbcluster
)
if
(
$opt_with_ndbcluster
&&
!
$opt_skip_ndbcluster
)
{
{
mtr_add_arg
(
$args
,
"
%s--ndbcluster
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--ndbcluster
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--ndb-connectstring=%s
",
$prefix
,
mtr_add_arg
(
$args
,
"
%s--ndb-connectstring=%s
",
$prefix
,
...
...
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