summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorunknown <timour@askmonty.org>2012-03-12 00:45:18 +0200
committerunknown <timour@askmonty.org>2012-03-12 00:45:18 +0200
commitecbd868f58db42e52a2dd8f46c6ee39dc4425cc5 (patch)
tree56fd7bd0b23d301d39db1b98d969e1fd5942a665 /sql/sql_lex.h
parent96a21ab324d02b53cbc7ee8d4585d66eda6dd429 (diff)
parent8aebd44e0ea9c4ae6f573f1ece27b276452122b8 (diff)
downloadmariadb-git-ecbd868f58db42e52a2dd8f46c6ee39dc4425cc5.tar.gz
Merged the implementation of MDEV-28 LIMIT ROWS EXAMINED into MariaDB 5.5.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index d4e94c8d2d8..718c9c7e6a2 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -2568,6 +2568,22 @@ struct LEX: public Query_tables_list
into the select_lex.
*/
table_map used_tables;
+ /**
+ Maximum number of rows and/or keys examined by the query, both read,
+ changed or written. This is the argument of LIMIT ROWS EXAMINED.
+ The limit is represented by two variables - the Item is needed because
+ in case of parameters we have to delay its evaluation until execution.
+ Once evaluated, its value is stored in examined_rows_limit_cnt.
+ */
+ Item *limit_rows_examined;
+ ulonglong limit_rows_examined_cnt;
+ inline void set_limit_rows_examined()
+ {
+ if (limit_rows_examined)
+ limit_rows_examined_cnt= limit_rows_examined->val_uint();
+ else
+ limit_rows_examined_cnt= ULONGLONG_MAX;
+ }
LEX();