Currently for MySQL search backend SQL_CALC_FOUND_ROWS with FOUND_ROWS() is used to count total search results.
As per https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_found-rows The SQL_CALC_FOUND_ROWS query modifier and accompanying FOUND_ROWS() function are deprecated as of MySQL 8.0.17 and are expected to be removed later.
MySQL documentation advices using COUNT() instead, also it's subject to certain optimizations unlike SQL_CALC_FOUND_ROWS.
Also, on some DBMS versions when phpBB's debug.sql_explain is enabled queries like EXPLAIN SELECT FOUND_ROWS() as result_count return 0 despite there're results in a search (which is a bug).
- caused
-
PHPBB-16976 phpBB Native Search returns 1 match and one page of results
- Closed
- is related to
-
PHPBB-15524 Search Doesn't Work on Topics Option
- Open
-
PHPBB-16779 Search $total_match_count allways 0 if "debug.sql_explain: true" enabled
- Confirmed