hack-sql-fake icon indicating copy to clipboard operation
hack-sql-fake copied to clipboard

Unions not supported in subqueries

Open muglug opened this issue 4 years ago • 0 comments

Found and fixed this bug in the PHP version:

This query

SELECT * FROM (SELECT * FROM `foo` UNION ALL SELECT * FROM `bar`) AS `baz`

is treated as

SELECT * FROM (SELECT * FROM `foo`) AS `baz`

Here's the commit with the fix in the PHP version, you should be able to port it relatively straightforwardly if you run into the same issue.

muglug avatar Jan 08 '21 18:01 muglug