From a3fe485dfe8443065d5b2d4f078b8607c473ff12 Mon Sep 17 00:00:00 2001 From: "mkindahl@dl145h.mysql.com" <> Date: Tue, 12 Feb 2008 18:21:17 +0100 Subject: [PATCH] Various fixes to fix memory leaks after merging replication tree with main. --- sql/sql_binlog.cc | 1 + sql/sql_class.cc | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index cff4ceeccf9..462806ab10d 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -234,6 +234,7 @@ void mysql_client_binlog_statement(THD* thd) send_ok(thd); end: + thd->rli_fake->clear_tables_to_lock(); my_free(buf, MYF(MY_ALLOW_ZERO_PTR)); DBUG_VOID_RETURN; } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 5180cafc774..044ea70e994 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -870,7 +870,10 @@ THD::~THD() #endif #ifndef EMBEDDED_LIBRARY if (rli_fake) + { delete rli_fake; + rli_fake= NULL; + } #endif free_root(&main_mem_root, MYF(0));