News for hackers. Stuff that matters.
Re:Why Uber Engineering Switched from Postgres to MySQL (2016) by consp on Saturday February 27, 2021 @06:18AM (#26284101)
Considering the US uses a weird date format, I definitely prefer the former in combination with input sanitation forcing you to thing about your actions before assuming the database will fix it for you.
Re:Why Uber Engineering Switched from Postgres to MySQL (2016) by corty on Saturday February 27, 2021 @06:32AM (#26284164)
Agreed. As with strong typing in programming languages, I do prefer a database to be strict in rejecting invalid inputs. MySQL does two bad things here: It accepts an invalid input plus it interprets it creatively, producing something the user most probably didn't intend. In that respect, MySQL is almost as bad as Excel creatively "interpreting" dates.

Another example of a database doing improper things would be Oracle mixing up the empty string with NULL. In Oracle, both are the same...

MySQL has a few more of those gotchas, e.g. regarding broken charsets (UTF-8 isn't 'utf8', it is 'utf8mb4', 'utf8' is an alias for 'utf8mb3' which is a broken subset). I wouldn't use MySQL for any data that was important to get back consistently. However, since Uber seems to be using some schemaless "we don't care"-layer anyways, that point is moot for the original article.

Re:Why Uber Engineering Switched from Postgres to MySQL (2016) by vinger on Saturday February 27, 2021 @09:33AM (#26285072)
utf8mb3 isn't a broken subset. It includes characters in the basic multilingual plane which is fine for 99% of cases.

uft8mb4 uses more bytes than necessary for most. You get 255 varchar limits with uft8mb3, I think you only get 192 characters with uft8mb4.

Re:Why Uber Engineering Switched from Postgres to MySQL (2016) by Alexendoo on Saturday February 27, 2021 @10:00AM (#26285240)
uft8mb4 does not use more bytes than utf8mb3, for anything representable by utf8mb3 the size in uft8mb4 is identical. Anything that would be 4 bytes in uft8mb4 is not able to be stored in utf8mb3

utf8mb3 is definitely a broken subset, it's deprecated at the very least

Re:Why Uber Engineering Switched from Postgres to MySQL (2016) by bbarnett on Saturday February 27, 2021 @08:18AM (#26284661)
https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mo...

Much of your MySQL complaint is not a MySQL issue, but a config issue.

And yes, powerful config options are good, not bad.

Re:Why Uber Engineering Switched from Postgres to MySQL (2016) by BitPirate on Saturday February 27, 2021 @09:55AM (#26285210)
One can still complain about mysqls dumb defaults.

https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.ht...

"Hey, let's just not act transactional on a timeout by default"

Re:Why Uber Engineering Switched from Postgres to MySQL (2016) by evanelias on Saturday February 27, 2021 @10:54AM (#26285604)
That default is sensible. You're making it sound like this setting applies to all "timeouts" regardless of type. That is not the case.

This setting applies to lock-wait timeouts. The default value allows applications to decide on the correct course of action: either re-try just the statement that timed out (without having to re-do the previous parts of the transaction), or rollback the transaction.

The application still receives an error on the timeout regardless of this setting. The database doesn't automatically commit the previous statements in the transaction regardless of this setting.