Commit 37e076c9 authored by unknown's avatar unknown

Merge neptunus.(none):/home/msvensson/mysql/same_tools/my50-same_tools

into  neptunus.(none):/home/msvensson/mysql/same_tools/my51-same_tools


client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/extra/rpl_tests/rpl_stm_charset.test:
  Auto merged
mysql-test/r/rpl_stm_charset.result:
  Auto merged
parents 70c1311f 51f19343
...@@ -2429,7 +2429,7 @@ void do_set_charset(struct st_command *command) ...@@ -2429,7 +2429,7 @@ void do_set_charset(struct st_command *command)
typedef struct typedef struct
{ {
const char *name; const char *name;
long code; uint code;
} st_error; } st_error;
static st_error global_error_names[] = static st_error global_error_names[] =
...@@ -2443,8 +2443,8 @@ static st_error global_error_names[] = ...@@ -2443,8 +2443,8 @@ static st_error global_error_names[] =
uint get_errcode_from_name(char *error_name, char *error_end) uint get_errcode_from_name(char *error_name, char *error_end)
{ {
#ifdef HAVE_MYSQLD_ERNAME
DBUG_ENTER("get_errcode_from_name"); DBUG_ENTER("get_errcode_from_name");
#ifdef HAVE_MYSQLD_ERNAME
/* SQL error as string */ /* SQL error as string */
st_error *e= global_error_names; st_error *e= global_error_names;
...@@ -2461,8 +2461,7 @@ uint get_errcode_from_name(char *error_name, char *error_end) ...@@ -2461,8 +2461,7 @@ uint get_errcode_from_name(char *error_name, char *error_end)
if (!strncmp(error_name, e->name, (int) (error_end - error_name)) && if (!strncmp(error_name, e->name, (int) (error_end - error_name)) &&
(uint) strlen(e->name) == (uint) (error_end - error_name)) (uint) strlen(e->name) == (uint) (error_end - error_name))
{ {
return (uint) e->code; DBUG_RETURN(e->code);
break;
} }
} }
if (!e->name) if (!e->name)
...@@ -2472,7 +2471,7 @@ uint get_errcode_from_name(char *error_name, char *error_end) ...@@ -2472,7 +2471,7 @@ uint get_errcode_from_name(char *error_name, char *error_end)
LINT_INIT(error_end); LINT_INIT(error_end);
abort_not_in_this_version(); abort_not_in_this_version();
#endif #endif
return 0; DBUG_RETURN(0);;
} }
......
...@@ -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 ($$$);
...@@ -1307,6 +1307,10 @@ sub executable_setup () { ...@@ -1307,6 +1307,10 @@ sub executable_setup () {
$exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog"); $exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin"); $exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql"); $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
if ( $mysql_version_id >= 50100 )
{
$exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
}
# Look for mysql_fix_system_table script # Look for mysql_fix_system_table script
$exe_mysql_fix_system_tables= $exe_mysql_fix_system_tables=
...@@ -1540,7 +1544,7 @@ sub environment_setup () { ...@@ -1540,7 +1544,7 @@ sub environment_setup () {
# ---------------------------------------------------- # ----------------------------------------------------
# Setup env so childs can execute mysqlslap # Setup env so childs can execute mysqlslap
# ---------------------------------------------------- # ----------------------------------------------------
unless ( $glob_win32 ) if ( $exe_mysqlslap )
{ {
my $cmdline_mysqlslap= my $cmdline_mysqlslap=
"$exe_mysqlslap -uroot " . "$exe_mysqlslap -uroot " .
...@@ -2539,7 +2543,10 @@ EOF ...@@ -2539,7 +2543,10 @@ EOF
; ;
print OUT "nonguarded\n" if $instance->{'nonguarded'}; print OUT "nonguarded\n" if $instance->{'nonguarded'};
if ( $mysql_version_id >= 50100 )
{
print OUT "log-output=FILE\n" if $instance->{'old_log_format'}; print OUT "log-output=FILE\n" if $instance->{'old_log_format'};
}
print OUT "\n"; print OUT "\n";
} }
...@@ -2866,25 +2873,18 @@ sub report_failure_and_restart ($) { ...@@ -2866,25 +2873,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 +2903,22 @@ sub do_before_start_master ($$) { ...@@ -2903,30 +2903,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 )
...@@ -3068,8 +3060,13 @@ sub mysqld_arguments ($$$$$) { ...@@ -3068,8 +3060,13 @@ sub mysqld_arguments ($$$$$) {
# Directory where slaves find the dumps generated by "load data" # Directory where slaves find the dumps generated by "load data"
# on the server. The path need to have constant length otherwise # on the server. The path need to have constant length otherwise
# test results will vary, thus a relative path is used. # test results will vary, thus a relative path is used.
my $slave_load_path= "../tmp";
if ( $mysql_version_id < 50000 )
{
$slave_load_path= "../../var/tmp";
}
mtr_add_arg($args, "%s--slave-load-tmpdir=%s", $prefix, mtr_add_arg($args, "%s--slave-load-tmpdir=%s", $prefix,
"../tmp"); $slave_load_path);
mtr_add_arg($args, "%s--socket=%s", $prefix, mtr_add_arg($args, "%s--socket=%s", $prefix,
$slave->[$idx]->{'path_sock'}); $slave->[$idx]->{'path_sock'});
mtr_add_arg($args, "%s--set-variable=slave_net_timeout=10", $prefix); mtr_add_arg($args, "%s--set-variable=slave_net_timeout=10", $prefix);
...@@ -3682,7 +3679,7 @@ sub run_testcase_start_servers($) { ...@@ -3682,7 +3679,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($tname,$tinfo->{'master_sh'}); do_before_start_master($tinfo);
mysqld_start($master->[0],$tinfo->{'master_opt'},[]); mysqld_start($master->[0],$tinfo->{'master_opt'},[]);
...@@ -3747,7 +3744,7 @@ sub run_testcase_start_servers($) { ...@@ -3747,7 +3744,7 @@ sub run_testcase_start_servers($) {
restore_slave_databases($tinfo->{'slave_num'}); restore_slave_databases($tinfo->{'slave_num'});
do_before_start_slave($tname,$tinfo->{'slave_sh'}); do_before_start_slave($tinfo);
if ( ! $opt_skip_ndbcluster_slave and if ( ! $opt_skip_ndbcluster_slave and
!$clusters->[1]->{'pid'} and !$clusters->[1]->{'pid'} 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