Hi Joachim,
I noticed in the error logs when I was debugging some other stuff. I don’t have the logs any more but it’s easy to reproduce in a mysql console. The The issue is that the possible syntaxes changed twice: once from 5.4 to 5.5 and again from 5.5 to 5.6.
mysql 5.5:
mysql> set option SQL_BIG_SELECTS = 1;
Query OK, 0 rows affected (0.00 sec)
mysql 5.6:
mysql> SET OPTION SQL_BIG_SELECTS = 1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_BIG_SELECTS = 1' at line 1
The reason is that the SET OPTION
syntax is deprecated (but functional) in MySQL5.5, but removed in 5.6. (see first sentence here).
In MySQL <= 5.5.2, the scope for SQL_BIG_SELECTS
is SESSION
. In MySQL >= 5.5.3, it is SESSION
or GLOBAL
(see here).
So lib/wp-content-aware-engine/core.php:344 should (IMHO) be changed to read something like:
$stmt = version_compare($wpdb->db_version(), '5.5', '>=')
? 'SET SESSION SQL_BIG_SELECTS = 1'
: 'SET SQL_BIG_SELECTS = 1'
;
$wpdb->query($stmt);