Bug #78121 | Incorrect value reported in SHOW SLAVE STATUS, Auto_Position | ||
---|---|---|---|
Submitted: | 18 Aug 2015 9:30 | Modified: | 10 Feb 2016 16:44 |
Reporter: | Shlomi Noach (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S3 (Non-critical) |
Version: | 5.6, 5.6.26 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | GTID, replication |
[18 Aug 2015 9:30]
Shlomi Noach
[18 Aug 2015 15:58]
Shlomi Noach
"09" is of course a typo and should be "0"
[19 Aug 2015 8:31]
MySQL Verification Team
Hi Shlomi, Thank you for the report. Verified this behavior with 5.6.26 builds. Thanks, Umesh
[19 Aug 2015 8:33]
MySQL Verification Team
test results
Attachment: 78121_5.6.26.results (application/octet-stream, text), 13.30 KiB.
[10 Dec 2015 6:34]
Venkatesh Duggirala
Posted by developer: Post from Developer: ==================== There are two problems reported this bug. Issue 1) "change master to master_auto_position=0" command is accepted by slave server even when MASTER_LOG_FILE or MASTER_LOG_POS are *not* specified. In the documentation https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-howto.html ,We say ======================================== If you need to revert from GTID-based replication (auto_position= 1) to replication based on files and positions(auto_position=0), you *must* use one or both of these options(MASTER_LOG_FILE AND MASTER_LOG_POS) together with MASTER_AUTO_POSITION = 0 in the CHANGE MASTER TO statement. ========================================= Unfortunately, documentation is wrong here and we will correct it soon. There is no requirement that you must specify one of the two parameters. If you dont specify, Slave will read the current values from slave_master_info and uses them at the time reconnecting to Master. Hence We will update https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-howto.html and https://dev.mysql.com/doc/refman/5.6/en/change-master-to.html with the current information. Sorry for the inconvenience caused. Issue 2) Incorrect AUTO_POSITION value in show slave status. Given the above explanation for Issue-1 that the command is successful, I think this is not true. It is reporting correct AUTO_POSITION value in Show slave status. Here I would like to mention few things about AUTO_POSITION vs GTID_MODE Permissible values for GTID_MODE= { ON or OFF } (talking about 5.6 version here) Permissible values for AUTO_POSITION = { 0 or 1 } Position based Replication: (AUTO_POSITION= 0) means When Slave connects to Master, it says I have downloaded till binlog file X and binlog file position Y. And Master send the events starting from X:Y+1 location. GTID-based Replication: (AUTO_POSITION= 1 ) means When Slave connect to Master, it says I have downloaded X gtids. And Master sends all other gtid groups which are not part of set X. In case GTID_MODE=OFF, there is no meaning to AUTO_POSITION=1 and we throw error if some one try to set to. In case GTID_MODE=ON, both {0, 1} are allowed and it represents how Slave informs master what it has. And users can switch from 0 to 1 and 1 to 0 when Slave threads (IO and SQL threads) are down. At the re connection of IO thread, depends on AUTO_POSITION , initial handshake will happen. Please let me know if you have any doubts regarding the above explanation or please let me know if I missed something important from the bug report. If everything is OK, we will convert this bug into documentation bug and will fix it as reported in issue-1. Thanks, Venkatesh.
[10 Feb 2016 16:44]
David Moss
Thanks for your feedback. This was recently fixed in the documentation, with some incorrect information removed and mentions of CHANGE MASTER TO made more accurate.