mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-35571 Check for LIMIT ROWS EXAMINED exceeded in UNION ALL
When UNION ALL is used with LIMIT ROWS EXAMINED, and when the limit is exceeded for a SELECT that is not the last in the UNION, interrupt the execution and call end_eof on the result. This makes sure that the results are sent, and the query result status is conclusive rather than empty, which would cause an assertion failure.
This commit is contained in:
@ -1026,7 +1026,8 @@ bool select_union_direct::send_eof()
|
||||
// Reset for each SELECT_LEX, so accumulate here
|
||||
limit_found_rows+= thd->limit_found_rows;
|
||||
|
||||
if (unit->thd->lex->current_select == last_select_lex)
|
||||
if (unit->thd->lex->current_select == last_select_lex ||
|
||||
thd->killed == ABORT_QUERY)
|
||||
{
|
||||
thd->limit_found_rows= limit_found_rows;
|
||||
|
||||
|
Reference in New Issue
Block a user