We have a laravel 4.1 application that used to run under PHP 5.4, however since upgrading to 5.6.13 (And today to 5.6.14) I've noticed that queries have started to sometimes return 0 for FOUND_ROWS()
. On some of our queries it seems to be intermittent, however on others it's more of a permanent issue.
The biggest impacted sets are those with sub queries.
We're using PDO (we're not using the laravel models, just interacting directly with its PDO object). MySQL hasn't been modified in this time frame either.
Tried all sorts - one suggestion was to set trace mode to 0, that didn't help though. I tried setting PDO::MYSQL_ATTR_USE_BUFFERED_QUERY
to false, however that leads to a PDO error when you try and select FOUND_ROWS()
(Can't get the exact message right now).
Short of rolling back to 5.4 (please God no), I'm completely stuck...
Running these queries directly in MySQL, and then running FOUND_ROWS()
always returns the correct results.