Bug #78446 mysqldbcompare ERROR: Comparing the same object on the same server.
Submitted: 16 Sep 2015 4:58 Modified: 19 Jan 2016 23:36
Reporter: Shahriyar Rzayev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Utilities Severity:S2 (Serious)
Version:1.5.4, 1.5.5 OS:Any
Assigned to: CPU Architecture:Any

[16 Sep 2015 4:58] Shahriyar Rzayev
Description:
I you try to use mysqldbcompare with server1=server2 and object1=object2 there will be an error indicating that, could not compare same object on same server:

sh@sh--home:~$ mysqldbcompare --server1=root:12345@localhost:3306 --server2=root:12345@localhost:3306 test_diff1:test_diff1
# WARNING: Using a password on the command line interface can be insecure.
# server1 on localhost: ... connected.
# server2 on localhost: ... connected.
ERROR: Comparing the same object on the same server.

But with localhost, if you use 127.0.0.1 instead of localhost in server2 connection, it will compare same object in localhost:

sh@sh--home:~$ mysqldbcompare --server1=root:12345@localhost:3306 --server2=root:12345@127.0.0.1:3306 test_diff1:test_diff1
# WARNING: Using a password on the command line interface can be insecure.
# server1 on localhost: ... connected.
# server2 on 127.0.0.1: ... connected.
# Checking databases test_diff1 on server1 and test_diff1 on server2
#
#                                                   Defn    Row     Data   
# Type      Object Name                             Diff    Count   Check  
# ------------------------------------------------------------------------- 
# TABLE     tst1                                    pass    pass    -       
#           - Compare table checksum                                pass   

# Databases are consistent.
#
# ...done

How to repeat:
See description.

Suggested fix:
'127.0.0.1' should be treated as 'localhost'.
[16 Sep 2015 7:04] MySQL Verification Team
Hello Shahriyar Rzayev,

Thank you for the report.

Thanks,
Umesh
[19 Jan 2016 23:36] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Utilities 1.6.3 release, and here's the changelog entry:

The mysqldbcompare utility now checks if MySQL servers are aliases.

Thank you for the bug report.
[7 Mar 2017 17:54] David Wasson
Still occurs on 1.6.5