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

@ -7761,8 +7761,8 @@ void mysql_init_multi_delete(LEX *lex)
{
lex->sql_command= SQLCOM_DELETE_MULTI;
mysql_init_select(lex);
lex->first_select_lex()->limit_params.select_limit= 0;
lex->unit.lim.set_unlimited();
lex->first_select_lex()->limit_params.clear();
lex->unit.lim.clear();
lex->first_select_lex()->table_list.
save_and_clear(&lex->auxiliary_table_list);
lex->query_tables= 0;