Trying to parse the following query (simplified on purpose):
SELECT
'John' as first_name,
'Doe' as last_name,
'M' as gender
FROM
dual
UNION
SELECT
first_name,
last_name,
a.gender
FROM
users
JOIN ( SELECT * FROM user_infos WHERE gender = 'M' ) a ON a.user_id = users.user_id
crashes since we upgraded the version 4.2.0 of PHP-SQL-Parser. It was not the case in former versions.
It seems that the function splitUnionRemainder in UnionProcessor introduced a regression, only when there is a JOIN with parenthesis in the last part of a UNION.
Trying to parse the following query (simplified on purpose):
crashes since we upgraded the version 4.2.0 of PHP-SQL-Parser. It was not the case in former versions.
It seems that the function
splitUnionRemainder
inUnionProcessor
introduced a regression, only when there is a JOIN with parenthesis in the last part of a UNION.