• Luis Soares's avatar
    BUG#42749: infinite loop writing to row based binlog - processlist shows · 60a2bbb8
    Luis Soares authored
    "freeing items"
    
    The calculation of the table map log event in the event constructor
    was one byte shorter than what would be actually written. This would
    lead to a mismatch between the number of bytes written and the event
    end_log_pos, causing bad event alignment in the binlog (corrupted
    binlog) or in the transaction cache while fixing positions
    (MYSQL_BIN_LOG::write_cache). This could lead to impossible to read
    binlog or even infinite loops in MYSQL_BIN_LOG::write_cache.
    
    This patch addresses this issue by correcting the expected event
    length in the Table_map_log_event constructor, when the field metadata
    size exceeds 255.
    
    sql/log_event.cc:
      Added the extra byte as net_store_length imposes.
    60a2bbb8
binlog_tbl_metadata.test 6.97 KB