[wp-trac] [WordPress Trac] #47280: SQL_CALC_FOUND_ROWS is deprecated as of MySQL 8.0.17

WordPress Trac noreply at wordpress.org
Wed Jul 20 07:27:58 UTC 2022


#47280: SQL_CALC_FOUND_ROWS is deprecated as of MySQL 8.0.17
--------------------------------------------+-----------------------------
 Reporter:  javorszky                       |       Owner:  johnbillion
     Type:  enhancement                     |      Status:  reviewing
 Priority:  normal                          |   Milestone:  Future Release
Component:  Database                        |     Version:
 Severity:  normal                          |  Resolution:
 Keywords:  has-patch has-unit-tests early  |     Focuses:  performance
--------------------------------------------+-----------------------------

Comment (by akramipro):

 `COUNT(*)` query is not working when using `GROUP BY` in sql query .
 and if you remove `GROUP BY`the result is not the same as `SELECT
 FOUND_ROWS()`

 see this exam. main query result has 415 rows but with count query if we
 remove `GROUP BY` we get 423 rows

 [[Image(https://i.ibb.co/M5rsqzY/179920451-1c238783-b255-4b07-ac39-e50296100f36.png)]]
 [[Image(https://i.ibb.co/Y8KRVNQ/179920575-81b41c72-c033-456c-a442-9e9fe82e4765.png)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47280#comment:35>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list