summaryrefslogtreecommitdiff
path: root/sql/group_by_handler.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-09-26 09:49:50 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-10-13 09:40:41 +0200
commiteb0804ef5e7eeb059bb193c3c6787e8a4188d34d (patch)
tree7a159b51f5ddd8d936185cb61b66a3c1c535e2d0 /sql/group_by_handler.cc
parent833637144178dcae60e7bb732dd373679f32d853 (diff)
downloadmariadb-git-eb0804ef5e7eeb059bb193c3c6787e8a4188d34d.tar.gz
MDEV-18553: MDEV-16327 pre-requisits part 1: isolation of LIMIT/OFFSET handling
Diffstat (limited to 'sql/group_by_handler.cc')
-rw-r--r--sql/group_by_handler.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/group_by_handler.cc b/sql/group_by_handler.cc
index 326aad439ef..cb1462fce0e 100644
--- a/sql/group_by_handler.cc
+++ b/sql/group_by_handler.cc
@@ -40,7 +40,7 @@ int Pushdown_query::execute(JOIN *join)
{
int err;
ha_rows max_limit;
- ha_rows *reset_limit= 0;
+ bool reset_limit= FALSE;
Item **reset_item= 0;
THD *thd= handler->thd;
TABLE *table= handler->table;
@@ -52,11 +52,11 @@ int Pushdown_query::execute(JOIN *join)
if (store_data_in_temp_table)
{
max_limit= join->tmp_table_param.end_write_records;
- reset_limit= &join->unit->select_limit_cnt;
+ reset_limit= TRUE;
}
else
{
- max_limit= join->unit->select_limit_cnt;
+ max_limit= join->unit->lim.get_select_limit();
if (join->unit->fake_select_lex)
reset_item= &join->unit->fake_select_lex->select_limit;
}
@@ -112,7 +112,7 @@ int Pushdown_query::execute(JOIN *join)
break; // LIMIT reached
join->do_send_rows= 0; // Calculate FOUND_ROWS()
if (reset_limit)
- *reset_limit= HA_POS_ERROR;
+ join->unit->lim.set_unlimited();
if (reset_item)
*reset_item= 0;
}