mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-18553: MDEV-16327 pre-requisits part 2: uniform of LIMIT/OFFSET handling
Now both offset and limit are stored and do not chenged during execution (offset is decreased during processing in versions before 10.5). (Big part of this changes made by Monty)
This commit is contained in:
@ -5095,6 +5095,14 @@ class select_result_sink: public Sql_alloc
|
||||
public:
|
||||
THD *thd;
|
||||
select_result_sink(THD *thd_arg): thd(thd_arg) {}
|
||||
inline int send_data_with_check(List<Item> &items,
|
||||
SELECT_LEX_UNIT *u,
|
||||
ha_rows sent)
|
||||
{
|
||||
if (u->lim.check_offset(sent))
|
||||
return 0;
|
||||
return send_data(items);
|
||||
}
|
||||
/*
|
||||
send_data returns 0 on ok, 1 on error and -1 if data was ignored, for
|
||||
example for a duplicate row entry written to a temp table.
|
||||
|
Reference in New Issue
Block a user