Edit. Fuck HN.
The issue seems to be that the .NET core provider for MySQL that OP uses maps the .NET Timespan type to this MySQL TIME datatype. They probably didn't think this through.
Time for a WTF MySQL Moment
11–20 of 121 posts
Re: Time for a WTF MySQL Moment
#12Edit. Fuck HN.
Re: Time for a WTF MySQL Moment
#13Edit. Fuck HN.
The moment the author wrote "I normally use PostgreSQL" I knew that this would devolve into a "MySQL Bad" even if it's well defined and documented behavior.
Re: Time for a WTF MySQL Moment
#14Earlier quoted context omitted.
The issue seems to be that the .NET core provider for MySQL that OP uses maps the .NET Timespan type to this MySQL TIME datatype. They probably didn't think this through.
Edit. Fuck HN.
The surprise here is not that the type has limits but that they are so awkward and that there is no better strongly-typed alternative.
Re: Time for a WTF MySQL Moment
#15I learned the semi hard way on PoC system where the Mysql index corrupted. I was lucky and could simply redeploy my application, but I have never used Mysql since.
Re: Time for a WTF MySQL Moment
#16> 1 bit sign (1= non-negative, 0= negative) First time I ever saw a number where the leading sign bit has to be set to 1 to indicate non-negative.
Re: Time for a WTF MySQL Moment
#17> 1 bit sign (1= non-negative, 0= negative) First time I ever saw a number where the leading sign bit has to be set to 1 to indicate non-negative.
Re: Time for a WTF MySQL Moment
#18Earlier quoted context omitted.
> "I think this is stupid" is a really poor reason to break backwards compatibility, despite how many other software projects use this reasoning. True. But his argument seems to be in the direction of "this is highly unexpected behaviour" and I tend to agree. The number of applications broken by extending the date range probably dwarves to the number of bugs avoided by not having the time span break at such a strange…
> "this is highly unexpected behaviour" The behavior in question is having an upper and lower bound on a time interval. This strikes me as highly expected behavior. The maximum on the interval is lower than the author expected; and reading the docs quickly cleared up what the interval maximum is. The entire rant boils down to "MySQL's choice to keep backwards compatibility is stupid, because I think this interval lim…
Re: Time for a WTF MySQL Moment
#19All DBs have their warts and while MySQL has an over abundance of warts they tend to be quite well documented. The warts that postgres has tend to be quite buried and their documentation is very good for syntax comprehension but rather light when it comes to deeper learning.
1. https://stackoverflow.com/questions/50364475/how-to-force-po...
Re: Time for a WTF MySQL Moment
#20Earlier quoted context omitted.
> "I think this is stupid" is a really poor reason to break backwards compatibility, despite how many other software projects use this reasoning. True. But his argument seems to be in the direction of "this is highly unexpected behaviour" and I tend to agree. The number of applications broken by extending the date range probably dwarves to the number of bugs avoided by not having the time span break at such a strange…
> "this is highly unexpected behaviour" The behavior in question is having an upper and lower bound on a time interval. This strikes me as highly expected behavior. The maximum on the interval is lower than the author expected; and reading the docs quickly cleared up what the interval maximum is. The entire rant boils down to "MySQL's choice to keep backwards compatibility is stupid, because I think this interval lim…