4 ms·
Given that the article says that everyone should use utf8mb4, then why don't/haven't they just fixed it? Should be easy enough, and probably safe, too.
by kreetx 8y ago
Given that the article says that everyone should use utf8mb4, then why don't/haven't they just fixed it? Should be easy enough, and probably safe, too.
- ofrzeta 8y agoThey have. It's the default in MySQL 8.
- kreetx 8y agoSorry, should have bern more clear: why didn't they fix the bug in utf8 so that it is correct (and would do what utf8mb4 does now)? It's just that the obvious choice of 'utf8' has been plain wrong for a long time.
- shadofx 8y agofrom the article: >Once MySQL published this invalid character set, it could never fix it: that would force every user to rebuild every database.
- morgo 8y agoThe desire for backwards compatibility/easier upgrades is why utf8mb4 could not just replace utf8: The sorting order for the utf8 collations is not identical to utf8mb4 ones, and so an upgrade would require indexed columns to be rebuilt (remember, indexes are sorted). I think with hindsight it would have been better to rip the bandaid off. 8.0 took a middle of the road approach by switching the default to utf8mb4.
- johannes1234321 8y agoThis can't silently be changed as the setting has impact on disk format for data and indexes and so and will be confusing when using different server versions, i.e. in replication.