diff options
author | unknown <mkindahl@dl145h.mysql.com> | 2008-02-06 14:44:47 +0100 |
---|---|---|
committer | unknown <mkindahl@dl145h.mysql.com> | 2008-02-06 14:44:47 +0100 |
commit | be5a46a69b63eebfd4413e43a4f6a7b3c0c0bcd0 (patch) | |
tree | 9c6f98a123d4df815f3a539bac1071c063280a06 /sql/slave.cc | |
parent | 6cb9dfed6fb711b550c91f66609f4a34fa74cf78 (diff) | |
download | mariadb-git-be5a46a69b63eebfd4413e43a4f6a7b3c0c0bcd0.tar.gz |
Patch to eliminate some valgrind warnings in debug printout code.
sql/rpl_rli.cc:
Adding variable to mark an instance of Relay_log_info as fake.
sql/rpl_rli.h:
Adding variable to mark an instance of Relay_log_info as fake.
sql/slave.cc:
Not printing debug information if we are working with a fake
instance of Relay_log_info. This because the result of calling
update is nonsense, and trying to print it generates valgrind
warnings.
sql/sql_binlog.cc:
Marking newly created instance of Relay_log_info as a fake instance.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 22 |
1 files changed, 14 insertions, 8 deletions
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" |