1
0
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:
Oleksandr Byelkin
2017-11-13 10:02:59 +01:00
parent d2bf101cbf
commit d1b666b5c6
4 changed files with 44 additions and 4 deletions

View File

@ -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();
};