Bug #15132 RBR: memory leak when updating large rows
Submitted: 22 Nov 2005 12:55 Modified: 22 Nov 2005 14:20
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.0-wl1012 OS:Linux (linux)
Assigned to: Guilhem Bichot CPU Architecture:Any

[22 Nov 2005 12:55] Guilhem Bichot
Description:
==4159== 640 bytes in 5 blocks are definitely lost in loss record 5 of 7
==4159==    at 0x11B1FE96: malloc (vg_replace_malloc.c:149)
==4159==    by 0x8CB6F2: my_malloc (my_malloc.c:35)
==4159==    by 0x8D8B80: bitmap_init (my_bitmap.c:116)
==4159==    by 0x62211D: Rows_log_event::Rows_log_event(THD*, st_table*, unsigned long, st_bitmap const*, bool) (log_event.c
c:5005)
==4159==    by 0x6227BE: Update_rows_log_event::Update_rows_log_event(THD*, st_table*, unsigned long, st_bitmap const*, bool
) (log_event.cc:6505)
==4159==    by 0x58526D: Rows_log_event* THD::binlog_prepare_pending_rows_event<Update_rows_log_event>(st_table*, unsigned,
st_bitmap const*, unsigned long, unsigned long, bool) (sql_class.cc:2154)
==4159==    by 0x581D10: THD::binlog_update_row(st_table*, bool, st_bitmap const*, unsigned long, char const*, char const*)
(sql_class.cc:2405)
==4159==    by 0x655519: int binlog_log_row<Update_rows_log_event>(st_table*, char const*, char const*) (log_event.h:2062)
==4159==    by 0x652466: handler::ha_update_row(char const*, char*) (handler.cc:2729)
==4159==    by 0x609DF5: mysql_update(THD*, st_table_list*, List<Item>&, List<Item>&, Item*, unsigned, st_order*, unsigned l
ong, enum_duplicates, bool) (sql_update.cc:502)
==4159==    by 0x5A90A4: mysql_execute_command(THD*) (sql_parse.cc:3184)
==4159==    by 0x5AD1EB: mysql_parse(THD*, char*, unsigned) (sql_parse.cc:5579)
==4159==    by 0x5AD8E0: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1703)
==4159==    by 0x5AE994: do_command(THD*) (sql_parse.cc:1504)

How to repeat:
Run ./mysql-test-run --skip-ndb --valgrind --force --start-from=default
and look at var/log/master.err after flush_block_commit.

Suggested fix:
will fix
[22 Nov 2005 13:27] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/32530
[22 Nov 2005 14:04] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/32532
[22 Nov 2005 14:20] Guilhem Bichot
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

nothing to document, fixed in mysql-5.1-wl1012-v3