Bug #79539 Unnecessary condition for "Unknown system variable 'SERVER_UUID' on master."
Submitted: 7 Dec 2015 5:28 Modified: 7 Dec 2015 13:47
Reporter: Tsubasa Tanaka (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.7.9 OS:Any
Assigned to: CPU Architecture:Any

[7 Dec 2015 5:28] Tsubasa Tanaka
MySQL 5.6 displays an error when its master doesn't support SERVER_UUID(ex. Master is 5.5 and slave is 5.6)


By the way, MySQL 5.7 still have this condition but 5.7 will never display this message.


Because of that, MySQL 5.6 checks master has server_uuid by "SHOW GLOBAL VARIABLES LIKE 'SERVER_UUID'".
This can return empty result without error. This condition seems correct.


But MySQL 5.7 checks it by "SELECT @@GLOBAL.SERVER_UUID".
This can't return empty result. When master doesn't support server_uuid, then this query returns error.


After that, these lines are not used.

How to repeat:
Construct 5.5's master and 5.7's slave and "START SLAVE".

                Last_IO_Error: Fatal error: The slave I/O thread stops because a fatal error is encountered when it tries to get the value of SERVER_UUID variable from master.

This behavior has already explained at Bug #79272, but unnecessary code is still there.

Suggested fix:
Remove unnecessary else-if-condition.
[7 Dec 2015 13:47] MySQL Verification Team
Thank you for the bug report.