diff options
author | unknown <timour@askmonty.org> | 2012-03-11 14:39:20 +0200 |
---|---|---|
committer | unknown <timour@askmonty.org> | 2012-03-11 14:39:20 +0200 |
commit | 8aebd44e0ea9c4ae6f573f1ece27b276452122b8 (patch) | |
tree | e2907ea46e4680c18b85dace99b5ea00d5735043 /sql/sql_view.cc | |
parent | f92cfdb8a9ff7f8287239c39ce4735789a23e3df (diff) | |
download | mariadb-git-8aebd44e0ea9c4ae6f573f1ece27b276452122b8.tar.gz |
Implementation of MDEV-28 LIMIT ROWS EXAMINED
https://mariadb.atlassian.net/browse/MDEV-28
This task implements a new clause LIMIT ROWS EXAMINED <num>
as an extention to the ANSI LIMIT clause. This extension
allows to limit the number of rows and/or keys a query
would access (read and/or write) during query execution.
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 8760e936d36..4e89a4ce3d3 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -435,6 +435,17 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, goto err; } + if (lex->limit_rows_examined) + { + /* + LIMIT ROWS EXAMINED is not supported inside views to avoid complicated + side-effects and semantics of the clause. + */ + my_error(ER_NOT_SUPPORTED_YET, MYF(0), "LIMIT ROWS EXAMINED inside views"); + res= TRUE; + goto err; + } + sp_cache_invalidate(); if (!lex->definer) |