Given the query \'SELECT foo FROM bar WHERE a = x AND b = y OR c = z\', how does it parse this query?
\'SELECT foo FROM bar WHERE a = x AND b = y OR c = z\'
(a = x AND b = y) OR c = z?
(a = x AND b = y) OR c = z
from the MySQL manual section 11.2.1. Operator Precedence: http://dev.mysql.com/doc/refman/5.0/en/operator-precedence.html
AND has precedence over OR. (a = x AND b = y) OR c = z is the equivalent expression.