WL#5805: Refactor rpl_master_has_bug
Affects: Server-5.5 — Status: Un-Assigned — Priority: Medium
This is a step towards making replication a library, such that the 5.6 rpl-lib can be plugged into the 5.5 core [WL#5675]. In this worklog, we refactor the function rpl_master_has_bug. rpl_master_has_bug is used by core when it executes statements from the slave SQL thread. The purpose is to check if the core needs to be bug-compatible with the master. rpl_master_has_bug takes a bug number and a Relay_log_info as input and returns true if the master has that bug. The core decides to simulate the bug based on the return value from rpl_master_has_bug. In this worklog, we split the functionality of rpl_master_has_bug into two parts, one in rpl-lib and one in core: - In rpl_lib, we add the function void Slave::get_master_version(THD *thd, char *buf), which stores the version of the master from which thd is executing events into buf. This function is exposed to core. - In core, we add the function int server_has_bug(char *version, int bug_number), which returns nonzero if the given version has the given bug number. This function does not need to be exposed externally.
Copyright (c) 2000, 2017, Oracle Corporation and/or its affiliates. All rights reserved.