Bug #85292 unreachable statement in function process_event with event type QUERY_EVENT
Submitted: 3 Mar 2017 14:48
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S2 (Serious)
Version:5.6+ OS:Any
Assigned to: CPU Architecture:Any

[3 Mar 2017 14:48] Shane Bester
Description:
1>e:\mysql-trunk\client\mysqlbinlog.cc(1132): warning C4702: unreachable code

In mysqlbinlog.cc in function

Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
                          my_off_t pos, const char *logname)
<cut>
switch (ev_type) {
    case binary_log::QUERY_EVENT:
    {
<cut>
  ev->print(result_file, print_event_info);
      if (head->error == -1)
        goto err;
      break;
      
      destroy_evt= TRUE;
    }
<cut>

As we can see,  the line "destroy_evt= TRUE;" is not reachable because it is after the break..

I suspect this could be responsible for memory leak...

How to repeat:
read compiler warnings, check code.