mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
c9840c0144
Before the patch, queries like: SELECT 1 FROM dual UNION SELECT 2 FROM dual were failing badly, with everything but the first numeric element being ignored by the optimization. So, being conservative, now we reduce the query being analysed, ignoring any subquery, inline view (anything within parenthesis in general) and, in the remaining query, if a boolean query (UNION, MINUS, INTERSECT...) is found, we don't apply any optimization.