mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-30828 Prevent pushing down unions with incorrect ORDER BY
Fake_select_lex->join was prepared at the unit execution stage so the validation of fake_select_lex before the unit pushdown was incomplete. That caused pushing down of statements having an incorrect ORDER BY clause. This commit moves preparation of the fake_select_lex->join to the unit prepare() method, before initializing of the pushdown handler, so incorrect clauses error out before being pushed down
This commit is contained in:
@ -11720,6 +11720,16 @@ UPDATE t, v SET t.b = t.a, t.a = v.c WHERE v.c < t.a {
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"join_preparation": {
|
||||
"select_id": "fake",
|
||||
"steps": [
|
||||
{
|
||||
"expanded_query": "select c AS c from dual"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"join_preparation": {
|
||||
"select_id": 1,
|
||||
@ -11967,16 +11977,6 @@ UPDATE t, v SET t.b = t.a, t.a = v.c WHERE v.c < t.a {
|
||||
"steps": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"join_preparation": {
|
||||
"select_id": "fake",
|
||||
"steps": [
|
||||
{
|
||||
"expanded_query": "select c AS c from dual"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"join_optimization": {
|
||||
"select_id": "fake",
|
||||
|
Reference in New Issue
Block a user