If you try to create a union with several tables:
select 1 UNION select 2 UNION select 3
the DBDatabaseDriverMySQL driver generates:
( (select 1) UNION (select 2)) UNION (select 3)
and MySQL does NOT support nested UNIONs.
If could solved by changing the anonymous class in DBDatabaseDriverMySQL.createCombinedCommand but it should be done by default.