mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-25080 Fix crash for CREATE TABLE from pushed union
During st_select_lex_unit::prepare() the member select_unit* st_select_lex_unit::union_result is being assigned to an instance of one of the following classes: - select_unit - select_unit_ext - select_unit_recursive - select_union_direct Select_union_direct used to pass the result of the query directly to the receiving select_result without filling a temporary table. This class wraps a select_result object and is currently used to process UNION ALL queries. Other select_unit_* classes involve some additional result processing. Pushed down units are processed on the engine side so the results must be also passed directly to a select_result object. So in the case when the unit pushdown is employed st_select_lex_unit::union_result must be assigned to an instance of select_union_direct.
This commit is contained in:
committed by
Sergei Golubchik
parent
3118132228
commit
b5507c738f
@@ -1056,6 +1056,7 @@ public:
|
||||
private:
|
||||
bool exec_inner();
|
||||
bool is_derived_eliminated() const;
|
||||
bool set_direct_union_result(select_result *sel_result);
|
||||
};
|
||||
|
||||
typedef class st_select_lex_unit SELECT_LEX_UNIT;
|
||||
|
Reference in New Issue
Block a user