Ever since I upgraded from 10.4.x to 10.5, I get the popup dialog with an SQL Error saying the “EXPLAIN” statement failed whenever I run a query in which I've commented out a line. For instance:
SELECT * FROM users u
INNER JOIN managers m ON m.id = u.manager_id
WHERE 1;
This works fine. Now when I comment out the JOIN and run it again:
SELECT * FROM users u
# INNER JOIN managers m ON m.id = u.manager_id
WHERE 1;
I get an error:
EXPLAIN WHERE 1 LIMIT 0, 10000;
However, once I close the error dialog, the actual query proceeds and is executed just fine, correctly ignoring the commented line.
It looks to me like the EXPLAIN statement that SQLyog runs by default whenever I run a query, is not skipping the commented line as it should, but instead it “forgets” or ignores everything before the commented line. I've tried this with fairly long, complex statements and the behavior seems pretty consistent. But I'm quite certain I never had this problem before the upgrade!