summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2021-03-28 21:09:51 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2021-04-21 14:08:58 +0300
commit2d595319bf542dcdeeb058139efa2ef54f645c7b (patch)
tree0b1386cd1340b2a2c175f45f12d64e35e945e1b9 /sql/sql_lex.cc
parent3fcc4f6fc24e8bde2f7d3a6aa162d69554bf8e6f (diff)
downloadmariadb-git-2d595319bf542dcdeeb058139efa2ef54f645c7b.tar.gz
cleanup: Select_limit_counters rename set_unlimited to clear
The function was originally introduced by eb0804ef5e7eeb059bb193c3c6787e8a4188d34d 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.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index ca7732316c7..69eaf5e174b 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -2910,7 +2910,7 @@ void st_select_lex_unit::init_query()
{
init_query_common();
set_linkage(GLOBAL_OPTIONS_TYPE);
- lim.set_unlimited();
+ lim.clear();
union_distinct= 0;
prepared= optimized= optimized_2= executed= 0;
bag_set_op_optimized= 0;