From 29cc45d0cec092a0e25c73cd33fb160747de78bb Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Thu, 14 Aug 2008 10:42:10 +0800 Subject: [PATCH] BUG#38290 valgrind warnings in binlog_base64_flag The problem was because the event allocated in mysql_client_binlog_statement was not freed when an error occured while applying the event. sql/sql_binlog.cc: Delete the event if apply it failed --- sql/sql_binlog.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index a6d0c8c9e9b..7ca7bef3a56 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -208,6 +208,7 @@ void mysql_client_binlog_statement(THD* thd) #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) if (apply_event_and_update_pos(ev, thd, thd->rli_fake, FALSE)) { + delete ev; /* TODO: Maybe a better error message since the BINLOG statement now contains several events.