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

Replace usage of SQL_CALC_FOUND_ROWS with separate queries #22225

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented May 16, 2024

Description:

With MySQL 8.0.17 the SQL_CALC_FOUND_ROWS feature has been deprecated.

To ensure we stay compatible with upcoming MySQL releases, where this might be removed, this PR replaces all usages with separate queries to fetch the count.

Review

@sgiehl sgiehl added the Needs Review PRs that need a code review label May 16, 2024
@sgiehl sgiehl added this to the 5.1.0 milestone May 16, 2024
@sgiehl sgiehl requested a review from a team May 16, 2024 14:38
@michalkleiner
Copy link
Contributor

I can't see it from the PR itself — how is the change around the headers related to the SQL_CALC_FOUND_ROWS?

@sgiehl
Copy link
Member Author

sgiehl commented May 17, 2024

The API does not return the count directly but sends it with a header. The changes are only to make that header testable in the API tests.

@sgiehl sgiehl merged commit 9deb8c7 into 5.x-dev May 17, 2024
22 of 25 checks passed
@sgiehl sgiehl deleted the dev-18046 branch May 17, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants