diff options
author | Igor Babaev <igor@askmonty.org> | 2016-08-29 22:45:17 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2016-08-29 22:45:17 -0700 |
commit | 9ac235ab7ddaefb2191a03d3e9cb025d584e3c36 (patch) | |
tree | 1bdf1222108233b1ec1e753328b704cd1b55a041 /sql/sql_cte.h | |
parent | c8f85bf263a81a625089507d747236852ec87024 (diff) | |
download | mariadb-git-9ac235ab7ddaefb2191a03d3e9cb025d584e3c36.tar.gz |
mdev-9864: cleanup, re-factoring.
Added comments.
Added reaction for exceeding maximum number of elements in with clause.
Added a test case to check this reaction.
Added a test case where the specification of a recursive table
uses two non-recursive with tables.
Diffstat (limited to 'sql/sql_cte.h')
-rw-r--r-- | sql/sql_cte.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sql/sql_cte.h b/sql/sql_cte.h index 20164174214..94fad561b0d 100644 --- a/sql/sql_cte.h +++ b/sql/sql_cte.h @@ -210,6 +210,8 @@ public: friend class With_clause; }; +const uint max_number_of_elements_in_with_clause= sizeof(table_map)*8; + /** @class With_clause @brief Set of with_elements @@ -270,15 +272,7 @@ public: with_recursive(recursive_fl) { } - /* Add a new element to the current with clause */ - bool add_with_element(With_element *elem) - { - elem->owner= this; - elem->number= with_list.elements; - elem->spec->with_element= elem; - with_list.link_in_list(elem, &elem->next); - return false; - } + bool add_with_element(With_element *elem); /* Add this with clause to the list of with clauses used in the statement */ void add_to_list(With_clause ** &last_next) |