Bug #56355 Request confirmation to shutdown if slave_open_temp_tables != 0
Submitted: 30 Aug 2010 5:00 Modified: 11 Oct 2016 21:49
Reporter: Roel Van de Paar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[30 Aug 2010 5:00] Roel Van de Paar
Description:
If temporary tables on a slave are being used to update non-temporary tables, a data inconsistency may occur if the slave is shutdown. The manual warns against this at http://dev.mysql.com/doc/refman/5.1/en/replication-features-temptables.html but we can make this more safe by allowing the user a choice when shutting down the server.

How to repeat:
mysqladmin shutdown when slave_open_temp_tables != 0

Suggested fix:
C:\mysql\bin>mysqladmin -uroot shutdown
Warning: The slave currently has temporary tables open which will not be available after the server restarts. Are you sure you want to proceed with shutting down the servery [Y/N]?: N
[30 Aug 2010 5:01] Roel Van de Paar
Better: "Warning: The slave currently has temporary tables open which will not be available after the server restarts. Are you sure you want to proceed with shutting down the server (which may result in data inconsistency) [Y/N]?: N"
[13 Oct 2010 10:15] MySQL Verification Team
Roel, will the fix for bug #56118 solve this?
[1 Nov 2010 7:47] Libing Song
Shane Bester:
BUG#56118 cannot solve this problem. As the patch for Bug#56118 is confined
in a transaction. Slave SQL thread will not stop until the transaction has finished, if there is a temporary table is created in the transaction.
[25 Aug 2016 13:06] Daniƫl van Eeden
Does the new SHUTDOWN command in MySQL 5.7 change the situation (I guess it doesn't).
https://dev.mysql.com/doc/refman/5.7/en/shutdown.html

Maybe it could at least return a warning?
[26 Aug 2016 0:03] Roel Van de Paar
A warning would be great...
[11 Oct 2016 21:49] Roel Van de Paar
IMHO, this bug should have been fixed years ago.