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

when ordering by value from json col, cast text to char #15615

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Aug 28, 2024

Description

In MySQL, when ordering by a field that resolves to the default Schema::TYPE_TEXT, we need to cast the value to a CHAR for the order by clause. Otherwise, the sort order will be incorrect.

order by title ascending (before and after this PR):
Screenshot 2024-08-28 at 14 18 45

order by plain text field ascending (before this PR):
Screenshot 2024-08-28 at 14 18 55

order by plain text field ascending (with this PR):
Screenshot 2024-08-28 at 14 19 13

Related issues

#15609

@brandonkelly brandonkelly merged commit 7a8018d into 5.x Aug 29, 2024
@brandonkelly brandonkelly deleted the bugfix/15609-order-by-value-from-json-column branch August 29, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants