Overview of the Issue
Running show character set returns wrong results. It only returns 2 encodings with utf8 and utf8mb4, but Vitess these days supports many more character sets & collations.
Using like for filtering the results also returns the wrong results.
Reproduction Steps
mysql> show character set;
+----------+---------------------------------+---------------------+--------+
| Charset | Description | Default collation | Maxlen |
+----------+---------------------------------+---------------------+--------+
| utf8 | UTF-8 Unicode | utf8mb3_general_ci | 3 |
| utf8mb4 | UTF-8 Unicode | utf8mb4_general_ci | 4 |
+----------+---------------------------------+---------------------+--------+```
There's multiple issues here. We're not using the explicit utf8mb3 value yet. It also shows utf8mb4_general_ci as the default collation which is wrong for MySQL 8. We should be using collations.Default() instead for this.
mysql> show character set like 'utf%';
+---------+------------------+--------------------+--------+
| Charset | Description | Default collation | Maxlen |
+---------+------------------+--------------------+--------+
| utf8 | UTF-8 Unicode | utf8mb3_general_ci | 3 |
+---------+------------------+--------------------+--------+
This shows only the first result and not all results that match.
Binary Version
Operating System and Environment details
Log Fragments
No response
Overview of the Issue
Running
show character setreturns wrong results. It only returns 2 encodings withutf8andutf8mb4, but Vitess these days supports many more character sets & collations.Using
likefor filtering the results also returns the wrong results.Reproduction Steps
There's multiple issues here. We're not using the explicit
utf8mb3value yet. It also showsutf8mb4_general_cias the default collation which is wrong for MySQL 8. We should be usingcollations.Default()instead for this.This shows only the first result and not all results that match.
Binary Version
Operating System and Environment details
Log Fragments
No response