Skip to content

Removing SQL_CALC_FOUND_ROWS#3124

Merged
brianhogg merged 7 commits into
devfrom
remove/sql-calc-found-rows
Apr 10, 2026
Merged

Removing SQL_CALC_FOUND_ROWS#3124
brianhogg merged 7 commits into
devfrom
remove/sql-calc-found-rows

Conversation

@brianhogg

@brianhogg brianhogg commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Description

  • Removing SQL_CALC_FOUND_ROWS by building a separate count query off the same table, joins, where.
  • Check that SQL_CALC_FOUND_ROWS wasn't added to the query via a filter

Inspired by the approach in WordPress/wordpress-develop#3863 (unmerged due to the risks of the core filters that can modify the query in any way)

Fixes #3079

How has this been tested?

Manually

Checklist:

  • This PR requires and contains at least one changelog file.
  • My code has been tested.
  • My code passes all existing automated tests.
  • My code follows the LifterLMS Coding & Documentation Standards.

@ideadude ideadude moved this to Awaiting Review in Development Apr 10, 2026
@brianhogg brianhogg merged commit 4b8249c into dev Apr 10, 2026
17 checks passed
@brianhogg brianhogg deleted the remove/sql-calc-found-rows branch April 10, 2026 14:51
@github-project-automation github-project-automation Bot moved this from Awaiting Review to Done in Development Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants