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/FOUND_ROWS() deprecated as of MySQL 8.0.17 #4296

Closed
staabm opened this issue Jan 5, 2021 · 1 comment · Fixed by #4800
Closed

SQL_CALC_FOUND_ROWS/FOUND_ROWS() deprecated as of MySQL 8.0.17 #4296

staabm opened this issue Jan 5, 2021 · 1 comment · Fixed by #4800
Labels
Core REDAXO Core related things

Comments

@staabm
Copy link
Member

staabm commented Jan 5, 2021

Description / Beschreibung

The SQL_CALC_FOUND_ROWS query modifier and accompanying FOUND_ROWS() function are deprecated as of MySQL 8.0.17; expect them to be removed in a future version of MySQL. 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

mysql warning, die kürzlich aufgefallen ist

wir nutzen die genannte mysql api hier:

$sql->setQuery('SELECT FOUND_ROWS() as '. $sql->escapeIdentifier('rows'));

ich denke hier besteht erstmal kein akuter handlungsbedarf, aber man sollte es auf dem schirm behalten.

@gharlan
Copy link
Member

gharlan commented Jan 5, 2021

Interessanterweise steht hier, es wäre langsamer: https://dev.mysql.com/worklog/task/?id=12615
Dabei hatten wir es ja aus Performancegründen integriert, wenn ich mich recht entsinne.
Vielleicht war es damals aber auch anders als in neueren Versionen.

Ich denke jedenfalls, wir sollten es dann ruhig demnächst mal entfernen. (Eilt aber nicht.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core REDAXO Core related things
Development

Successfully merging a pull request may close this issue.

2 participants