Skip to content
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

Assert failure retreiving a TIMESTAMP value #9

Closed
Abscissa opened this issue May 18, 2013 · 4 comments
Closed

Assert failure retreiving a TIMESTAMP value #9

Abscissa opened this issue May 18, 2013 · 4 comments

Comments

@Abscissa
Copy link

Retrieving a TIMESTAMP value causes an assert to fail at location mysql/connection.d(1046).

I'm still investigating this further...

@Abscissa
Copy link
Author

It seems that TIMESTAMP values have the "unsigned" flag set, unlike DATETIME and other non-numeric types. Unfortunately, I can't find any documentation regarding the intended behavior of the unsigned flag on non-numeric types. So I don't know why this is, or whether or not it's always the case.

However, the MySQL protocol's documentation does state that TIMESTAMP's actual value information (aside from the flags) is exactly the same as DATETIME. So, ignoring the "unsigned" flag should work fine. And indeed it does seem to work fine for both me and at least one other user.

In any case, the triggered assertion turned out be faulty anyway: It erroneously assumed that non-integer types cannot be unsigned. This was a false assumption: Not only does TIMESTAMP (apparently) report itself as unsigned, but MySQL also permits floating-point and fixed-point types to be unsigned.

@Abscissa
Copy link
Author

Fixed by commit 93361e7

@sshamov
Copy link

sshamov commented Aug 20, 2013

There is a similar assert within the method consumeBinaryValueIfComplete.

@sshamov sshamov reopened this Aug 20, 2013
@sshamov
Copy link

sshamov commented Aug 20, 2013

Fixed by commit a8a3827

@sshamov sshamov closed this as completed Aug 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants