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

Incomparable Varchars on vtgate #7636

Closed
GuptaManan100 opened this issue Mar 8, 2021 · 1 comment · Fixed by #7678
Closed

Incomparable Varchars on vtgate #7636

GuptaManan100 opened this issue Mar 8, 2021 · 1 comment · Fixed by #7678

Comments

@GuptaManan100
Copy link
Member

Overview of the Issue

Running the query select version from schema_migrations order by version ASC in the sharded mode returns the error ERROR 1105 (HY000): types are not comparable: VARCHAR vs VARCHAR. This query support is required for rails compatibility.

Reproduction Steps

The issue can be reproduced by having a table with varchar columns in a sharded keyspace and trying to select that column in ascending order.

For example

mysql> select * from schema_migrations;
+----------------+
| version        |
+----------------+
| 20190822013911 |
| 20190822021835 |
| 20190822031056 |
| 20190823000019 |
| 20190823171209 |
| 20190823175841 |
| 20190824013003 |
| 20190824113338 |
| 20190827011913 |
| 20190827030205 |
| 20210201161500 |
| 20210204134900 |
| 20210205144300 |
| 20210208114300 |
| 20210209113800 |
| 20210209125800 |
| 20210209150300 |
| 20210210095100 |
| 20210210115100 |
| 20210210115800 |
| 20210210152000 |
| 20210211101500 |
| 20210212131000 |
| 20210212131200 |
| 20210212153800 |
| 20210215132200 |
| 20210216101500 |
| 20210216160700 |
| 20210217173100 |
| 20210219164600 |
| 20210219184900 |
| 20210222101300 |
+----------------+
32 rows in set (0.01 sec)
mysql> select version from schema_migrations order by version ASC;
ERROR 1105 (HY000): types are not comparable: VARCHAR vs VARCHAR
@systay
Copy link
Collaborator

systay commented Mar 23, 2021

Solved by #7678

@systay systay closed this as completed Mar 23, 2021
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.

3 participants