-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL tests fail on MySQL 5.6.x community edition as DateTime milliseconds are truncated #77
Comments
I also hit this, but on Linux, and with MySQL 8. Since this changes the way MySQL works by default, it might break other applications using the same database. |
so may need to actually specify a MySQL Dialect when creating the syncprovider. |
It's a known issue (I've already noticed that) I'm thinking on a new way to make the type value comparison beetween two providers (sql to mysql and so on..) |
Hi, |
Could you please elaborate on that? I do not see a solution here. |
Hi!
I am currently struggling with getting the unit- and integration tests to work on my dev machine.
In order to help others getting started, I created a simple powershell script which installs MySQL using chocolatey. 5.x is the only MySQL version available there, this is why I came across this bug:
Running "MySqlAllColumnsTests.OneRowFromServer" leads to an error:
The CDateTime value is
Expected: 2010-10-01T23:10:12.4000000
Actual: 2010-10-01T23:10:12.0000000'
The reason for that is that in MySQL 5.x, you need to specify the precision "6" in order to include milliseconds.
I.e. "DATETIME (6)"
see: https://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
I added a hacky fix to "MySqlDbMetadata" to fix this UT:
But that is obviously not perfect. Additionally, the precision on that column is set to "3" by default.
Question:
What would be the best way to fix this? Provision datetime columns as datetime (6) by default?
Note: I have very little experience with MySql so any advice is greatly welcome
The text was updated successfully, but these errors were encountered: