WL#7299: Binlog_sender: do not reallocate the event buffer for every event sent

Affects: Server-5.7   —   Status: Complete

EXECUTIVE SUMMARY
-----------------

This worklog implements an optimization on the dump thread that
removes unnecessary reallocation of the send buffer. The user visible
effect is that the CPU will be used less by each dump thread the
master has spawned.

MOTIVATION
----------

For several reasons:

  1. Several and recurrent requests have been made by a high profile
     MySQL replication user;

  2. To make the mysql server better utilize the hardware resources
     (adaptative memory allocation by the dump thread and less CPU
     usage);

  2. The general direction is that we improve replication performance
     and scalability and this is yet one more step down that path.

REFERENCES
----------

MySQL BUG#31932