From 01554206245dce4fa223992abfbdee6a38dd0a7e Mon Sep 17 00:00:00 2001 From: "mkindahl@dl145h.mysql.com" <> Date: Wed, 6 Feb 2008 06:18:06 +0100 Subject: [PATCH 1/2] Removing duplicate code from mysql-test-run.pl --- mysql-test/mysql-test-run.pl | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 536cb873b9a..89b4073ca87 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3870,14 +3870,6 @@ sub mysqld_arguments ($$$$) { mtr_add_arg($args, "%s--user=root"); } - # When mysqld is run by a root user(euid is 0), it will fail - # to start unless we specify what user to run as, see BUG#30630 - my $euid= $>; - if (!$glob_win32 and $euid == 0 and - (grep(/^--user/, @$extra_opt, @opt_extra_mysqld_opt)) == 0) { - mtr_add_arg($args, "%s--user=root", $prefix); - } - if ( $opt_valgrind_mysqld ) { mtr_add_arg($args, "%s--skip-safemalloc", $prefix); From 43f06a0557646ae5fd542f15fa10d86824880541 Mon Sep 17 00:00:00 2001 From: "mkindahl@dl145h.mysql.com" <> Date: Wed, 6 Feb 2008 14:44:47 +0100 Subject: [PATCH 2/2] Patch to eliminate some valgrind warnings in debug printout code. --- sql/rpl_rli.cc | 5 ++++- sql/rpl_rli.h | 4 ++++ sql/slave.cc | 22 ++++++++++++++-------- sql/sql_binlog.cc | 3 +++ 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index 3e9a484126a..03f790b934f 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -33,7 +33,10 @@ Relay_log_info::Relay_log_info() :Slave_reporting_capability("SQL"), no_storage(FALSE), replicate_same_server_id(::replicate_same_server_id), info_fd(-1), cur_log_fd(-1), save_temporary_tables(0), - group_relay_log_pos(0), + group_relay_log_pos(0), event_relay_log_pos(0), +#if HAVE_purify + is_fake(FALSE), +#endif cur_log_old_open_count(0), group_master_log_pos(0), log_space_total(0), ignore_log_space_limit(0), last_master_timestamp(0), slave_skip_counter(0), abort_pos_wait(0), slave_run_id(0), sql_thd(0), diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index a3a57ad4ce9..36daffae1af 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -154,6 +154,10 @@ public: ulonglong event_relay_log_pos; ulonglong future_event_relay_log_pos; +#ifdef HAVE_purify + bool is_fake; /* Mark that this is a fake relay log info structure */ +#endif + /* Original log name and position of the group we're currently executing (whose coordinates are group_relay_log_name/pos in the relay log) diff --git a/sql/slave.cc b/sql/slave.cc index 4ffc2023e85..c76e7c75a56 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1892,14 +1892,19 @@ int apply_event_and_update_pos(Log_event* ev, THD* thd, Relay_log_info* rli, if (exec_res == 0) { int error= ev->update_pos(rli); - char buf[22]; - DBUG_PRINT("info", ("update_pos error = %d", error)); - DBUG_PRINT("info", ("group %s %s", - llstr(rli->group_relay_log_pos, buf), - rli->group_relay_log_name)); - DBUG_PRINT("info", ("event %s %s", - llstr(rli->event_relay_log_pos, buf), - rli->event_relay_log_name)); +#ifdef HAVE_purify + if (!rli->is_fake) +#endif + { + char buf[22]; + DBUG_PRINT("info", ("update_pos error = %d", error)); + DBUG_PRINT("info", ("group %s %s", + llstr(rli->group_relay_log_pos, buf), + rli->group_relay_log_name)); + DBUG_PRINT("info", ("event %s %s", + llstr(rli->event_relay_log_pos, buf), + rli->event_relay_log_name)); + } /* The update should not fail, so print an error message and return an error code. @@ -1909,6 +1914,7 @@ int apply_event_and_update_pos(Log_event* ev, THD* thd, Relay_log_info* rli, */ if (error) { + char buf[22]; rli->report(ERROR_LEVEL, ER_UNKNOWN_ERROR, "It was not possible to update the positions" " of the relay log information: the slave may" diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index 04f408453ea..f1fbe6eb4b7 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -56,6 +56,9 @@ void mysql_client_binlog_statement(THD* thd) if (!thd->rli_fake) { thd->rli_fake= new Relay_log_info; +#ifdef HAVE_purify + thd->rli_fake->is_fake= TRUE; +#endif have_fd_event= FALSE; } if (thd->rli_fake && !thd->rli_fake->relay_log.description_event_for_exec)