1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

cleanup: Select_limit_counters rename set_unlimited to clear

The function was originally introduced by eb0804ef5e
MDEV-18553: MDEV-16327 pre-requisits part 1: isolation of LIMIT/OFFSET handling

set_unlimited had an overloaded notion of both clearing the offset value
and the limit value. The code is used for SQL_CALC_ROWS option to
disable the limit clause after the limit is reached, while at the same
time the calling code suppreses sending of rows.

Proposed solution:
Dedicated clear method for query initialization (to ensure no garbage
remains between executions).
Dedicated set_unlimited that only alters the limit value.
This commit is contained in:
Vicențiu Ciorbaru
2021-03-28 21:09:51 +03:00
parent 3fcc4f6fc2
commit 2d595319bf
4 changed files with 20 additions and 6 deletions

View File

@ -1340,7 +1340,7 @@ bool st_select_lex_unit::prepare(TABLE_LIST *derived_arg,
else
{
sl->join->result= result;
lim.set_unlimited();
lim.clear();
if (!sl->join->procedure &&
result->prepare(sl->join->fields_list, this))
{