diff options
author | Igor Babaev <igor@askmonty.org> | 2022-12-23 20:54:01 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2022-12-23 20:54:01 -0800 |
commit | cea5cdd0eb30444467420f91da10752cbe697d23 (patch) | |
tree | 07a7e87441d5e55d52cf6fcb4ba918c3a04a6c65 /sql/sql_class.h | |
parent | a09612014a827dc3bc09ab50bbb1b6b0b930190e (diff) | |
download | mariadb-git-bb-10.11-MDEV-29971.tar.gz |
MDEV-29971 Re-design the upper level of handling SELECT statementsbb-10.11-MDEV-29971
The initial patch.
All tests from the main test suite passed.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 1bc9e7ed24c..9bb4d6bd54e 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3398,6 +3398,7 @@ public: changed or written. */ ulonglong accessed_rows_and_keys; + ulonglong accessed_rows_and_keys_at_exec_start; /** Check if the number of rows accessed by a statement exceeded @@ -3405,7 +3406,8 @@ public: */ void check_limit_rows_examined() { - if (++accessed_rows_and_keys > lex->limit_rows_examined_cnt) + if ((++accessed_rows_and_keys - accessed_rows_and_keys_at_exec_start) > + lex->limit_rows_examined_cnt) set_killed(ABORT_QUERY); } |