diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-10-11 13:08:53 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-10-13 09:40:41 +0200 |
commit | ebeb4f93e8de0e6763a55dbf9a265afc32459608 (patch) | |
tree | ae243cc0b95151818645a4d5630bcaffce6efd2d /sql/sql_limit.h | |
parent | a6de6408042267558d9fb1f8efa884f8d09d1a34 (diff) | |
download | mariadb-git-ebeb4f93e8de0e6763a55dbf9a265afc32459608.tar.gz |
MDEV-16327: Server doesn't account for engines that supports OFFSET on their own.
Engine get LIMIT/OFFSET info an can it use/reset.
Diffstat (limited to 'sql/sql_limit.h')
-rw-r--r-- | sql/sql_limit.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_limit.h b/sql/sql_limit.h index 93a9aae85af..a4fcedac14a 100644 --- a/sql/sql_limit.h +++ b/sql/sql_limit.h @@ -28,6 +28,10 @@ class Select_limit_counters Select_limit_counters(): select_limit_cnt(0), offset_limit_cnt(0) {}; + Select_limit_counters(Select_limit_counters &orig): + select_limit_cnt(orig.select_limit_cnt), + offset_limit_cnt(orig.offset_limit_cnt) + {}; void set_limit(ha_rows limit, ha_rows offset) { @@ -48,6 +52,8 @@ class Select_limit_counters bool is_unlimited() { return select_limit_cnt == HA_POS_ERROR; } + bool is_unrestricted() + { return select_limit_cnt == HA_POS_ERROR && offset_limit_cnt == 0; } void set_unlimited() { select_limit_cnt= HA_POS_ERROR; offset_limit_cnt= 0; } |