colinhowe/mysqlpartialdump — pull request #1 by thomaskern (2012-10-18 12:57:35+00:00)
Title: Fixes query for multi-key primary keys

Adding parentheses to the WHERE clauses allows the usage of multi-column
primary keys/foreign keys.

E.g.: columns aid and aid2 are the primary keys and are queried in the
foreign table.

SELECT * FROM tabA WHERE aid = 5 AND aid2 = 7 OR aid = 5 AND aid2 = 8 OR
aid=9 AND aid10;

The parentheses fixes this:

SELECT * FROM tabA WHERE (aid = 5 AND aid2 = 7) OR (aid = 5 AND aid2 = 8) OR
(aid=9 AND aid10);