Issue #1105862 by druido, aaron: Fix Syntax error in MySQL-specific query results in PDOException with PostgreSQL.