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

Vitess wrong results: show character set where #5584

Closed
morgo opened this issue Dec 17, 2019 · 1 comment · Fixed by #5710
Closed

Vitess wrong results: show character set where #5584

morgo opened this issue Dec 17, 2019 · 1 comment · Fixed by #5710

Comments

@morgo
Copy link
Contributor

morgo commented Dec 17, 2019

Vtgate parses but handles this query incorrectly:

mysql> show character set where charset = 'utf8mb4';
+---------+---------------+--------------------+--------+
| Charset | Description   | Default collation  | Maxlen |
+---------+---------------+--------------------+--------+
| utf8    | UTF-8 Unicode | utf8_general_ci    |      3 |
| utf8mb4 | UTF-8 Unicode | utf8mb4_general_ci |      4 |
+---------+---------------+--------------------+--------+
2 rows in set (0.00 sec)

It was issued by MySQL workbench, and is expected to return 1 row.

@Ronihe
Copy link
Contributor

Ronihe commented Jan 9, 2020

Per @deepthi, right now the results returned from a show charset or show character set are hardcoded to be just these 2 rows. We could filter on the 2 rows, but we don't really want to expand the results or forward the query to an underlying mysql because vitess only supports these 2 charsets.

systay pushed a commit that referenced this issue Feb 6, 2020
right now the show character set are hardcoded to be filtered with where statement.
since we don't really want to expand the results or forward the query to an underlying mysql because vitess only supports these 2 charsets.

closes #5584

* separate show charset vs show charset in parser
* changed the executor accordingly
* use where_expression_opt in parser, changed AST and executor accordingly

Signed-off-by: roni <[email protected]>
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.

2 participants