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:
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
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)
switch (ev_type) {
    case binary_log::QUERY_EVENT:
  ev->print(result_file, print_event_info);
      if (head->error == -1)
        goto err;
      destroy_evt= TRUE;

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.