Commit 29cc45d0 authored by He Zhenxing's avatar He Zhenxing

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
parent f2188dc3
...@@ -208,6 +208,7 @@ void mysql_client_binlog_statement(THD* thd) ...@@ -208,6 +208,7 @@ void mysql_client_binlog_statement(THD* thd)
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) #if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
if (apply_event_and_update_pos(ev, thd, thd->rli_fake, FALSE)) if (apply_event_and_update_pos(ev, thd, thd->rli_fake, FALSE))
{ {
delete ev;
/* /*
TODO: Maybe a better error message since the BINLOG statement TODO: Maybe a better error message since the BINLOG statement
now contains several events. now contains several events.
......
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