View Issue Details

IDProjectCategoryView StatusLast Update
0003389SymmetricDSImprovementpublic2019-05-14 13:01
ReportersnpeAssigned To 
Status assignedResolutionopen 
Product Version3.9.2 
Target Version3.10.3Fixed in Version 
Summary0003389: Dbcompare ordering by PK with timestamp or varchar with utf8
DescriptionWe use symmetricds to replicate between MySQL and SQL Anywhere.

dbcompare returns a lot different rows.
I have noticed two issues:

1) when create comparison sql, symmetricds uses the order by as
ORDER BY <pk_column>
if PK column is text (varchar) that contains utf-8 characters, MySQL and SQL Anywhere will return different ordering
Solution: use the CONVERT function on MySQL and the CSCONVERT function on SQL Anywhere

2) SQL Anywhere saves timestamp values with milliseconds and MySQL (by default) without milliseconds
Solution: add options to round timestamp values similar as numbers
Steps To ReproduceWe use commercial databases and not sure that can provide reproducible case.
Additional InformationI have fixed both issue with patched symmetricds 3.9.x and I'm willing to create a patch.



2018-01-30 13:35

developer   ~0001108


Could you provide the patch you used or do a pull request so we can review your approach in the code?


2018-01-30 13:46

developer   ~0001109

Which version of Sybase are you running? Could you provide us with sample create table statements and some sample data for both MySql and SqlAnywhere so that we can try to reproduce?


2018-01-30 14:54

reporter   ~0001110

I'm using SQL Anywhere 11 and MySQL 5.7.21. I will provide a pull request and test case soon.


2018-02-06 16:32

developer   ~0001121

Last edited: 2018-02-06 16:32

View 2 revisions

We have added an option to specify a date-time format which should fix problem 2 here.

Here is a link to the issue:

Issue History

Date Modified Username Field Change
2018-01-21 16:27 snpe New Issue
2018-01-22 10:21 chenson Status new => confirmed
2018-01-25 08:49 kstojanovska Assigned To => kstojanovska
2018-01-25 08:49 kstojanovska Status confirmed => assigned
2018-01-30 13:35 kstojanovska Note Added: 0001108
2018-01-30 13:46 kstojanovska Note Added: 0001109
2018-01-30 14:54 snpe Note Added: 0001110
2018-02-06 16:32 kstojanovska Note Added: 0001121
2018-02-06 16:32 kstojanovska Note Edited: 0001121 View Revisions
2018-10-10 14:11 hanes Target Version => 3.10.0
2018-10-29 13:00 hanes Priority normal => low
2018-12-05 14:55 hanes Assigned To kstojanovska =>
2018-12-05 14:56 hanes Summary dbcompare, timestamp and utf8 => Timestamp and utf8 collation issues with dbcompare
2019-03-14 08:39 admin Target Version 3.10.0 => 3.10.1
2019-04-23 09:46 elong Target Version 3.10.1 => 3.10.2
2019-04-24 13:25 elong Tag Attached: dbcompare
2019-05-08 08:51 admin Target Version 3.10.2 => 3.10.3
2019-05-14 13:01 elong Summary Timestamp and utf8 collation issues with dbcompare => Dbcompare ordering by PK with timestamp or varchar with utf8