Issue #2246913 by Steven Jones | Garry Egan: Fixed Unknown column 'max_allowed_packet' in 'where clause'.