Make WordPress Core

Opened 3 years ago

Last modified 20 months ago

#20213 new enhancement

Pagination fails silently when mysql.trace_mode is on

Reported by: ManuelRazzari Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.4
Component: Database Keywords:
Focuses: Cc:


A sysadmin left enabled mysql.trace_mode on php.ini without me knowing about it, and I spent hours trying to find out why the next_posts_link wasn't showing up.

This is very hard to debug, because

  • it fails silently, with no error to look for
  • it's hard to repro on a dev server, which may not have the same php.ini settings as in staging/prod (ideally should, but rare for 99% of devs)

Other people had this same issue:

I've read through #18536, #10469 and related issues, hoping that usage of SQL_CALC_FOUND_ROWS would be removed, but it seems to be still there, in trunk.

So I guess a "fix" for this would be to check for trace_mode and, if enabled, notify admin users on the wp-admin dashboard.

Meanwhile, I've added a note about this on the next_posts_link page.

Change History (1)

comment:1 @nacin20 months ago

  • Component changed from Warnings/Notices to Database

Hi ManuelRazzari, thanks for the report many months ago. I've asked one of our contributors to take a look at this.

Note: See TracTickets for help on using tickets.