pingcap / tidb-tools

tidb-tools are some useful tool collections for TiDB.
Apache License 2.0
286 stars 190 forks source link

sync-diff-inspector: double quoting of table names #795

Closed dveeden closed 2 months ago

dveeden commented 3 months ago

Bug Report

$ ./bin/sync_diff_inspector --config ./sync-diff.conf 
A total of 1 tables need to be compared

Comparing the table structure of ``test`.`t1`` ... equivalent
Comparing the table data of ``test`.`t1`` ... failure
_____________________________________________________________________________
Progress [============================================================>] 100% 0/0
The data of `test`.`t1` is not equal

The rest of tables are all equal.

A total of 1 tables have been compared, 0 tables finished, 1 tables failed, 0 tables skipped.
The patch file has been generated in 
    'output/fix-on-tidb0/'
You can view the comparision details through './output/sync_diff.log'

Note the double quoting of table and schema names in some of the messages. Instead of ``test`.`t1`` it should be `test`.`t1`.

dveeden commented 3 months ago

It seems like the quoting is already done by utils.UniqueID() an then when printing extra quoting is added incorrectly.