From 333f794adc1ff447b2245e6aca405df1dec50665 Mon Sep 17 00:00:00 2001 From: "mats@romeo.(none)" <> Date: Thu, 23 Nov 2006 16:21:53 +0100 Subject: BUG#24488 (Valgrind warnings on invalid read in mysql_client_binlog_statement): Disabling debug printouts for valgrind builds that print unallocated memory. --- sql/sql_binlog.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sql/sql_binlog.cc') diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index 23ca5330053..732981b58f3 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -79,9 +79,15 @@ void mysql_client_binlog_statement(THD* thd) char const *endptr= 0; int bytes_decoded= base64_decode(strptr, coded_len, buf, &endptr); +#ifndef HAVE_purify + /* + This debug printout should not be used for valgrind builds + since it will read from unassigned memory. + */ DBUG_PRINT("info", ("bytes_decoded=%d; strptr=0x%lu; endptr=0x%lu ('%c':%d)", bytes_decoded, strptr, endptr, *endptr, *endptr)); +#endif if (bytes_decoded < 0) { @@ -147,8 +153,14 @@ void mysql_client_binlog_statement(THD* thd) DBUG_PRINT("info",("ev->get_type_code()=%d", ev->get_type_code())); DBUG_PRINT("info",("bufptr+EVENT_TYPE_OFFSET=0x%lx", bufptr+EVENT_TYPE_OFFSET)); +#ifndef HAVE_purify + /* + This debug printout should not be used for valgrind builds + since it will read from unassigned memory. + */ DBUG_PRINT("info", ("bytes_decoded=%d; bufptr=0x%lx; buf[EVENT_LEN_OFFSET]=%u", bytes_decoded, bufptr, uint4korr(bufptr+EVENT_LEN_OFFSET))); +#endif ev->thd= thd; if (int err= ev->exec_event(thd->rli_fake)) { -- cgit v1.2.1