-
Notifications
You must be signed in to change notification settings - Fork 36
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
Timestamp and unsigned(DateTime) #159
Comments
quinnj
added a commit
that referenced
this issue
Jun 1, 2020
Attempt to fix #159. It seems there are cases when `API.isunsigned` will return true for a timestamp column; this is probably due to some kind of database or column setting when the table was created, but nonetheless, it causes issues because if `API.isunsigned`, then we try to call `unsigned(T)`, which isn't defined for `DateTime`. As opposed to pirating that definition in MySQL.jl, here we attempt to also check the `NUM_FLAG`, which should tell us whether the field is numeric or not and hopefully avoid ever seeing `API.isunsigned` for timestamp columns.
quinnj
added a commit
that referenced
this issue
Jun 1, 2020
Attempt to fix #159. It seems there are cases when `API.isunsigned` will return true for a timestamp column; this is probably due to some kind of database or column setting when the table was created, but nonetheless, it causes issues because if `API.isunsigned`, then we try to call `unsigned(T)`, which isn't defined for `DateTime`. As opposed to pirating that definition in MySQL.jl, here we attempt to also check the `NUM_FLAG`, which should tell us whether the field is numeric or not and hopefully avoid ever seeing `API.isunsigned` for timestamp columns.
Thanks for reporting! I merged a fix for this to master; could you try it out and see if that fixes it for you? |
Yes, all good now, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running the test suite of 1.04 on Julia 1.4.1 on linux gave me the following error,
API.isunsigned
returns true for the timestamp field, and the error comes from this lineNot sure what the right fix is - should zero(DateTime) be something valid? Anyway, putting this in MySQL.jl got the tests pass, but not sure if that's the right approach.
The text was updated successfully, but these errors were encountered: