diff options
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); } |