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

WordPress Trac noreply at wordpress.org
Wed May 15 14:34:03 UTC 2019


#47280: SQL_CALC_FOUND_ROWS is deprecated as of MySQL 8.0.17
-------------------------+-----------------------------
 Reporter:  javorszky    |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Database     |    Version:  trunk
 Severity:  minor        |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 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 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.

 This is not yet immediately important because most hosts are on 5.5, or
 5.6, rarely 5.7, but given the speed with which trac tickets move that
 impact very core functionalities, I thought it best to open this ticket to
 get the work started.

 This impacts all the 6 places where it's being used, though one of them is
 in the WP_Query definition.

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


More information about the wp-trac mailing list