[MDEV-32966] "default collation" ids for the protocol Created: 2023-12-07 Updated: 2024-01-26 Resolved: 2024-01-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Protocol |
| Fix Version/s: | N/A |
| Type: | New Feature | Priority: | Critical |
| Reporter: | Sergei Golubchik | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Connection protocol only has one byte for selecting a collation. This is no longer enough. So connectors are forced to do SET NAMES on every connection. On the other hand, normally connectors don't care about a collation and only need to set a correct character set, and that most of the time is utf8. There are 41 unused values in the 0-255 range of collation ids. Then a connector will still be able to use one-byte in the protocol to set a character set of its choice and won't need SET NAMES. |
| Comments |
| Comment by Sergei Golubchik [ 2024-01-15 ] | ||||
|
see the this comment in MDEV-32975. I think that | ||||
| Comment by Alexander Barkov [ 2024-01-26 ] | ||||
|
I don't think we need special "default collation" IDs. After
So the compiled default collation IDs already work as "default collation". However, the comment added by
If we decide to go this way, we'll need something to allow the client to indicate Anyway, adding special collations IDs looks like over-engineering for me. I'd prefer some bit flag in the handshake header. | ||||
| Comment by Sergei Golubchik [ 2024-01-26 ] | ||||
|
This turned out to be already the case, default collations of all character sets always have id < 256, so they can be set in the handshake and don't require SET NAMES |