"I think this is stupid" is a really poor reason to break backwards compatibility, despite how many other software projects use this reasoning.
But of course, MySQL bad, PostgreSQL good.
"I think this is stupid" is a really poor reason to break backwards compatibility, despite how many other software projects use this reasoning.
But of course, MySQL bad, PostgreSQL good.
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 length.
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 limit should be larger."
Probably only a few applications; but that's still too many.
And backwards compatibility does matter. A change here means that some few dozen developers have to now troubleshoot a previously-stable application which now fails silently in odd corner cases.
Yes, that leaves a legacy of why should I use TIME2 or whatever instead of TIME, etc. That's the downfall of having a successful project over a long time frame and not having designed it perfectly at the beginning.
See also UTF8 shouldn't be used in MySQL because it's dumb. But you can't change UTF8 to do the right thing, you have to have a new name that's better.
Changing the limit from 838 to 999 wouldn't.
>To make matters worse, it appears that the most popular EF Core MySQL provider maps .NET’s TimeSpan to TIME by default, despite the fact that TimeSpan can contain intervals in the dozens of millennia (it uses a 64 bit integer and has 10-8 s precision)
It's this mapping is bogus. If the ranges don't match TimeSpans should be mapped to something else.
MySQL's BIGINTs are 64bits, so that might be a more reasonable target. Of course you lose some "typing" information in the schema, but it's probably worth it.
But I suppose it would make sense for MySQL to provide a "BIGTIME" alias for this purpose, and deprecate the old one maybe.
> lack of a suitable replacement
MySQL's various string "alternatives" have proven how stupid having multiple types with different limits really can be.