Bug #77585 | Slave_open_temp_tables wrong after RESET SLAVE when using multi-source | ||
---|---|---|---|
Submitted: | 1 Jul 2015 15:23 | Modified: | 14 Sep 2015 16:28 |
Reporter: | Sven Sandberg | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[1 Jul 2015 15:23]
Sven Sandberg
[1 Jul 2015 15:26]
Sven Sandberg
Posted by developer: In case solution 2 is used for problem 1, suggest to refine the checks in CHANGE MASTER TO and STOP SLAVE, so that it reports a warning only if *the affected channel* has open temporary tables. It is safe to use CHANGE MASTER TO and STOP SLAVE on a channel that does not have open temporary tables even if some other channel has open temporary tables.
[14 Sep 2015 16:28]
Jon Stephens
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at http://www.mysql.com/downloads/
[14 Sep 2015 16:54]
Jon Stephens
Documented fix in the 5.7.9 and 5.8.0 changelogs as follows: The status variable Slave_open_temp_tables keeps track of the number of temporary tables that are opened by the replication slave. If multi-source is enabled, it is the total number of temporary tables for all channels. This fix addresses the following issues relating to this variable: ·RESET SLAVE FOR CHANNEL channel forced the value of Slave_open_temp_tables to 0; in the event that some other replication channel had open temporary tables which were later dropped, the value wrapped around to a negative value (1-2³²). This also cause spurious or missed warnings when issuing a STOP SLAVE or CHANGE MASTER TO statement. ·The internal function that modifies Slave_open_temp_tables in such cases relies on two incorrect assumptions: 1. The variable is updated by only one thread when multi-threaded slaves are not enabled, which is not true in the case of multi-source replication. 2. Non-atomic operations are safe with a single writer and multiple readers, which is not necessarily true for all platforms supported by MySQL. Closed.