mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-14346: incorrect result of intersect with ANY/ALL/IN subquery
Reinit internal state of select_unit before using to correctly run it after first time.
This commit is contained in:
@ -5103,10 +5103,11 @@ public:
|
||||
|
||||
select_unit(THD *thd_arg):
|
||||
select_result_interceptor(thd_arg),
|
||||
curr_step(0), prev_step(0), curr_sel(UINT_MAX),
|
||||
step(UNION_TYPE), intersect_mark(0), write_err(0), table(0),
|
||||
records(0)
|
||||
{ tmp_table_param.init(); }
|
||||
intersect_mark(0), table(0)
|
||||
{
|
||||
init();
|
||||
tmp_table_param.init();
|
||||
}
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
/**
|
||||
Do prepare() and prepare2() if they have been postponed until
|
||||
@ -5130,6 +5131,14 @@ public:
|
||||
bool keep_row_order,
|
||||
uint hidden);
|
||||
TMP_TABLE_PARAM *get_tmp_table_param() { return &tmp_table_param; }
|
||||
void init()
|
||||
{
|
||||
curr_step= prev_step= 0;
|
||||
curr_sel= UINT_MAX;
|
||||
step= UNION_TYPE;
|
||||
write_err= 0;
|
||||
records= 0;
|
||||
}
|
||||
void change_select();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user