Remix.run Logo
tracker1 4 days ago

To me, every time I've touched MySQL, I've found an issue that just rubbed me the wrong way... starting with the fact that UTF8 isn't, and even across new major versions hasn't changed to an alias for the real UTF8. (VAR)BINARY does case sensitive collation based on db default, it shouldn't do any type of textual comparison even if the data is "text". You can't do foreign keys with ANSI quotes for the table/field names...

Note: some of this may have changed in the past 6+ years I've avoided looking at it again.

sgarland 3 days ago | parent [-]

> (VAR)BINARY

Close [0]: (VAR)CHAR BINARY, which is its own type, uses the `_bin` collation for the column or table character set. (VAR)BINARY stores binary strings, and uses the `binary` character set and collation.

In fairness, the amount of options, gotchas, and WTF involved with collations in any DB is mind-boggling.

[0]: https://dev.mysql.com/doc/refman/8.4/en/binary-varbinary.htm...

tracker1 3 days ago | parent [-]

I just know that I was sitting converted uuid and was getting collisions on different binary values. This was admittedly a couple decades ago though.

By converted it was legacy records where the original int value was injected to uuid format. This was then stored in a binary field as a primary key.