summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.cc
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@oracle.com>2011-05-23 23:46:51 +0100
committerLuis Soares <luis.soares@oracle.com>2011-05-23 23:46:51 +0100
commitd0f6fde3deb4752cd13fe2e8ac907477331da1f5 (patch)
tree1213d7c85a7130ea7be8174c3b36de46909a7b99 /sql/rpl_rli.cc
parentb1ad5f2e04651be71dc6d835f8ab671a9183ed62 (diff)
downloadmariadb-git-d0f6fde3deb4752cd13fe2e8ac907477331da1f5.tar.gz
BUG#12558519: RPL_TYPECONV PRODUCES VALGRIND STACK
In RBR and in case of converting blob fields, the space allocated while unpacking into the conversion field was not freed after copying from it into the real field. We fix this by freeing the conversion field when the conversion table is not needed anymore (on close_tables_to_lock).
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r--sql/rpl_rli.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index f2653894ea7..11c4924737d 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -1254,6 +1254,16 @@ void Relay_log_info::clear_tables_to_lock()
tables_to_lock->m_tabledef.table_def::~table_def();
tables_to_lock->m_tabledef_valid= FALSE;
}
+
+ /*
+ If blob fields were used during conversion of field values
+ from the master table into the slave table, then we need to
+ free the memory used temporarily to store their values before
+ copying into the slave's table.
+ */
+ if (tables_to_lock->m_conv_table)
+ free_blobs(tables_to_lock->m_conv_table);
+
tables_to_lock=
static_cast<RPL_TABLE_LIST*>(tables_to_lock->next_global);
tables_to_lock_count--;