Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: show character set returning wrong results #13564

Closed
dbussink opened this issue Jul 20, 2023 · 0 comments · Fixed by #13565
Closed

Bug Report: show character set returning wrong results #13564

dbussink opened this issue Jul 20, 2023 · 0 comments · Fixed by #13565

Comments

@dbussink
Copy link
Contributor

dbussink commented Jul 20, 2023

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

@dbussink dbussink added Type: Bug Needs Triage This issue needs to be correctly labelled and triaged labels Jul 20, 2023
@dbussink dbussink self-assigned this Jul 20, 2023
@dbussink dbussink added Component: Query Serving and removed Needs Triage This issue needs to be correctly labelled and triaged labels Jul 20, 2023
@dbussink dbussink mentioned this issue Jul 20, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant