mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-17201 dropped anchor rows with non-null recursion query
The function st_select_lex_unit::exec_recursive() missed resetting of select_limit_cnt and offset_limit_cnt before execution of union parts. As a result recursive CTEs specified by UNIONs whose SELECTs contained LIMIT/OFFSET could return wrong sets of records.
This commit is contained in:
@ -1274,6 +1274,7 @@ bool st_select_lex_unit::exec_recursive()
|
||||
for (st_select_lex *sl= start ; sl != end; sl= sl->next_select())
|
||||
{
|
||||
thd->lex->current_select= sl;
|
||||
set_limit(sl);
|
||||
sl->join->exec();
|
||||
saved_error= sl->join->error;
|
||||
if (!saved_error)
|
||||
|
Reference in New Issue
Block a user