rpl_diff.inc in 5.7 does not compare data from different servers
Bug #1680510 reported by
Yura Sorokin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Fix Released
|
Low
|
Yura Sorokin | |||
5.6 |
Fix Released
|
Low
|
Yura Sorokin | |||
5.7 |
Fix Released
|
Low
|
Yura Sorokin |
Bug Description
'include/
Instead of retrieving data from different servers specified by $rpl_diff_servers or from all servers configured by 'rpl_init.inc', it always connects to the default server.
Therefore, including this file will always succeed and will never show actual data difference between servers.
Tested on 5.7.17
tags: | added: ci |
To post a comment you must log in.
Here is an excerpt from rpl_diff.inc:
******* ******* ******* ******* ******* ******* *** diff_servers) server_ i= `SELECT SUBSTRING_ INDEX(' $_rpl_diff_ servers' , ',', 1)` '$_rpl_ diff_servers' , LENGTH( '$_rpl_ diff_server_ i') + 2)`
# Compare all servers.
--let $_rpl_diff_first= 1
while ($_rpl_
{
# Set $_rpl_diff_server_i to the first number in the list
--let $_rpl_diff_
# Remove $_rpl_diff_server_i from the list
--let $_rpl_diff_servers= `SELECT SUBSTRING(
# Execute statement VARDIR/ tmp/_rpl_ diff_server- $_rpl_diff_ server_ i.tmp statement_ file > $_rpl_diff_file
--let $_rpl_diff_file= $MYSQLTEST_
--exec $MYSQL $_rpl_diff_database < $_rpl_diff_
# Compare prev_file prev_file prev_file prev_file= $_rpl_diff_file prev_file ******* ******* ******* ******* ******* ***
if (!$_rpl_diff_first)
{
if ($rpl_debug)
{
--echo diffing $_rpl_diff_file and $_rpl_diff_
}
--diff_files $_rpl_diff_file $_rpl_diff_
--remove_file $_rpl_diff_
}
--let $_rpl_diff_
--let $_rpl_diff_first= 0
}
--remove_file $_rpl_diff_
*******
Although the script properly iterates over servers, it always executes $MYSQL with default connection parameters statement_ file > $_rpl_diff_file
--exec $MYSQL $_rpl_diff_database < $_rpl_diff_