#At file:///home/lsoares/Workspace/bzr/work/bugfixing/12558519/mysql-5.5/ based on revid:marc.alff@stripped
3386 Luis Soares 2011-05-17
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 after the copying takes
place.
modified:
sql/rpl_record.cc
=== modified file 'sql/rpl_record.cc'
--- a/sql/rpl_record.cc 2010-12-21 10:23:20 +0000
+++ b/sql/rpl_record.cc 2011-05-16 23:36:15 +0000
@@ -333,6 +333,13 @@ unpack_row(Relay_log_info const *rli,
#endif
copy.set(*field_ptr, f, TRUE);
(*copy.do_copy)(©);
+
+ /*
+ Blob fields may allocate memory during unpack stage.
+ We should free it once the conv_field is not in use
+ anymore. Thus we call f->free().
+ */
+ f->free();
#ifndef DBUG_OFF
char target_buf[MAX_FIELD_WIDTH];
String target_type(target_buf, sizeof(target_buf), system_charset_info);
Attachment: [text/bzr-bundle] bzr/luis.soares@oracle.com-20110516233615-61bit7h98mclu9ea.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5 branch (luis.soares:3386) Bug#12558519 | Luis Soares | 17 May |