diff --git a/mysqlpartialdump.py b/mysqlpartialdump.py index 479849e..5373317 100755 --- a/mysqlpartialdump.py +++ b/mysqlpartialdump.py @@ -271,8 +271,8 @@ def _do_follows(self, to_follow): args += [val for val in value] debug('Clauses to follow: %s'%clauses) info('Following %s with %s'%(table, values_to_follow)) - where = " OR ".join(clauses) - self._get_table(table, where, args) + where = ") OR (".join(clauses) + self._get_table(table, "(" + where + ")", args) del(follow_sets[col_names]) def _get_pk_value(self, table_name, row):