MySQL Blog Archive
For the latest blogs go to blogs.oracle.com/mysql
Server version in the binary log

Replication topologies, whether master-slave or group replication setups, may be composed of servers using different MySQL versions.

In MySQL 8.0.14, each transaction’s immediate and original server versions are now visible in the binary log as session variables. These two new variables, fully managed by the replication infrastructure, are used to support cross-version replication by transmitting the MySQL server release numbers associated with each transaction through the replication topology:

  • original_server_version stores the MySQL Server release number of the server where a transaction was originally committed (for example, 80014 for a MySQL 8.0.14 server instance).
  • immediate_server_version stores the MySQL Server release number of the server that is the immediate master in the replication topology (i.e., the last server where the transaction was applied).

Below is an excerpt on a binary log showing the Gtid log event of a transaction in which both original and immediate masters’ MySQL Server versions were 8.0.14.

 

The new variables improve the auditing and debugging of replication issues in topologies with servers of different versions. They also improve the support of replication from servers running older MySQL releases.

If there is a server in the replication topology that does not support this feature (its version number is older than 8.0.14), then all transactions replicated from that server will have original and immediate server versions set to ‘000000’.

We look forward to hearing your feedback on this new feature!