Bug #55292 my_b_write return value ignored
Submitted: 15 Jul 2010 15:39 Modified: 20 Jul 2012 9:35
Reporter: Mark Callaghan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.1.47, 5.1.49-bzr OS:Any
Assigned to: CPU Architecture:Any
Tags: IGNORE, my_b_write, return

[15 Jul 2010 15:39] Mark Callaghan
Description:
The return value from my_b_write is ignored by:
my_b_write_quoted
my_b_write_bit
Query_log_event::print_query_header

Most callers of my_b_printf ignore the return value. log_event.cc has many calls to it. Fixing my_b_write isn't sufficient.

How to repeat:
read the code, build a cscope database for it and browse the callers
[15 Jul 2010 15:53] Valeriy Kravchuk
Verified by code review. Just some of the results of simple

grep -rn my_b_write *

command in current mysql-5.1 tree:

...
sql/log_event.cc:1456:my_b_write_quoted(IO_CACHE *file, const uchar *ptr, uint length)
sql/log_event.cc:1463:      my_b_write(file, s, 1);
sql/log_event.cc:1468:      my_b_write(file, hex, len);
sql/log_event.cc:1483:my_b_write_bit(IO_CACHE *file, const uchar *ptr, uint nbits)
sql/log_event.cc:1490:    my_b_write(file, (const uchar*) (is_set ? "1" : "0"), 1);
...
[20 Jul 2012 9:35] Jon Stephens
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 bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html
[20 Jul 2012 9:37] Jon Stephens
Fixed in MySQL 5.1.65/5.5.27/5.6.7.

No user-facing changes, refactoring only.

Closed without further action.