Commit 12c43f4f authored by unknown's avatar unknown

Init some variables that changes between test cases direclty in run_testcase

This can not be done in run_testcase_start_servers as embedded never starts a server
Add error if mysqld_start is called in embedded mode 

parent 61e3438f
...@@ -2880,6 +2880,13 @@ sub find_testcase_skipped_reason($) ...@@ -2880,6 +2880,13 @@ sub find_testcase_skipped_reason($)
sub run_testcase ($) { sub run_testcase ($) {
my $tinfo= shift; my $tinfo= shift;
# -------------------------------------------------------
# Init variables that can change between each test case
# -------------------------------------------------------
$ENV{'TZ'}= $tinfo->{'timezone'};
mtr_verbose("Starting server with timezone: $tinfo->{'timezone'}");
my $master_restart= run_testcase_need_master_restart($tinfo); my $master_restart= run_testcase_need_master_restart($tinfo);
my $slave_restart= run_testcase_need_slave_restart($tinfo); my $slave_restart= run_testcase_need_slave_restart($tinfo);
...@@ -3409,6 +3416,9 @@ sub mysqld_start ($$$) { ...@@ -3409,6 +3416,9 @@ sub mysqld_start ($$$) {
my $type= $mysqld->{'type'}; my $type= $mysqld->{'type'};
my $idx= $mysqld->{'idx'}; my $idx= $mysqld->{'idx'};
mtr_error("Internal error: mysqld should never be started for embedded")
if $glob_use_embedded_server;
if ( $type eq 'master' ) if ( $type eq 'master' )
{ {
$exe= $exe_master_mysqld; $exe= $exe_master_mysqld;
...@@ -3849,12 +3859,6 @@ sub run_testcase_start_servers($) { ...@@ -3849,12 +3859,6 @@ sub run_testcase_start_servers($) {
my $tinfo= shift; my $tinfo= shift;
my $tname= $tinfo->{'name'}; my $tname= $tinfo->{'name'};
# -------------------------------------------------------
# Init variables that can change between server starts
# -------------------------------------------------------
$ENV{'TZ'}= $tinfo->{'timezone'};
mtr_verbose("Starting server with timezone: $tinfo->{'timezone'}");
if ( $tinfo->{'component_id'} eq 'mysqld' ) if ( $tinfo->{'component_id'} eq 'mysqld' )
{ {
if ( ! $opt_skip_ndbcluster and if ( ! $opt_skip_ndbcluster and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment