[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 16:27:52 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 rjasdfiii):

 @akramipro - It looks like that query could end up with "DISTINCT" twice;
 this seems wrong:

     SELECT DISTINCT COUNT(DISTINCT groupbyvar) ...

 Also, it is essentially wrong to mix DISTINCT and GROUP BY:

     SELECT DISTINCT ... GROUP BY ...

 (Since I don't know what happens after "return", I may be incorrectly
 critiquing the code.)

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


More information about the wp-trac mailing list