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

SQL_CALC_FOUND_ROWS query modifier and FOUND_ROWS() are deprecated as of MySQL 8.0.17 #488

Closed
blackcoder87 opened this issue Jul 15, 2020 · 0 comments · Fixed by #530
Closed

Comments

@blackcoder87
Copy link
Contributor

blackcoder87 commented Jul 15, 2020

Describe the bug
SQL_CALC_FOUND_ROWS and FOUND_ROWS() is used in a few modules for code related to the pagination and in the query builder.
https://github.com/IlchCMS/Ilch-2.0/search?q=SQL_CALC_FOUND_ROWS&unscoped_q=SQL_CALC_FOUND_ROWS
https://github.com/IlchCMS/Ilch-2.0/search?q=getFoundRows&unscoped_q=getFoundRows
https://github.com/IlchCMS/Ilch-2.0/search?q=useFoundRows&unscoped_q=useFoundRows
https://github.com/IlchCMS/Ilch-2.0/wiki/Doku-Entwickler-Database-QueryBuilder#result

The SQL_CALC_FOUND_ROWS query modifier and accompanying FOUND_ROWS() function are deprecated as of MySQL 8.0.17 and will be removed in a future MySQL version. As a replacement, considering executing your query with LIMIT, and then a second query with COUNT(*) and without LIMIT to determine whether there are additional rows.
Source: https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_found-rows

Replace the usage of these with a more future proof solution.

Additional context
https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_found-rows
https://github.com/IlchCMS/Ilch-2.0/search?q=SQL_CALC_FOUND_ROWS&unscoped_q=SQL_CALC_FOUND_ROWS

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.

1 participant