diff options
author | Roman Nozdrin <roman.nozdrin@mariadb.com> | 2021-02-04 11:58:40 +0000 |
---|---|---|
committer | Roman Nozdrin <roman.nozdrin@mariadb.com> | 2021-02-04 11:58:40 +0000 |
commit | 7ed0e6cbd3eb342e68ec4d866d2bf9d307c6e237 (patch) | |
tree | aebed9a7e9f2fcf2db0dfed1f26160d68521ea86 /sql/sql_select.cc | |
parent | eacefbca3596fa9cb853272265855d4efafd5f24 (diff) | |
download | mariadb-git-MDEV-24298.tar.gz |
MDEV-24298 MDB doesn't use Select Handler with INSERT..SELECT + UNION anymoreMDEV-24298
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 01ca12aa371..986d7e6ba52 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -4563,7 +4563,9 @@ select_handler *find_select_handler(THD *thd, { if (select_lex->next_select()) return 0; - if (select_lex->master_unit()->outer_select()) + // Quit early if this is a subquery or query has a set operation. + if (select_lex->master_unit()->outer_select() || + select_lex->master_unit()->first_select()->next_select()) return 0; TABLE_LIST *tbl= nullptr; |