summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-02-28 18:13:28 +0400
committerAlexander Barkov <bar@mariadb.com>2019-02-28 18:13:28 +0400
commit0ad598a00b17008b0c0702db40948b14d7eee0d5 (patch)
tree4288555eee4e2fb9c427d8aa97ba762eb7c03b0f /sql/sql_lex.cc
parentc9b9d9f5152b2ec16e88c0b235d50420c52b41de (diff)
downloadmariadb-git-0ad598a00b17008b0c0702db40948b14d7eee0d5.tar.gz
A cleanup in derived table handling: removing duplicate code from st_select_lex::handle_derived()
st_select_lex::handle_derived() and mysql_handle_list_of_derived() had exactly the same implementations. - Adding a new method LEX::handle_list_of_derived() instead - Removing public function mysql_handle_list_of_derived() - Reusing LEX::handle_list_of_derived() in st_select_lex::handle_derived()
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index cfbde25314b..3c0d3049ae4 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -3593,14 +3593,7 @@ bool st_select_lex::optimize_unflattened_subqueries(bool const_only)
bool st_select_lex::handle_derived(LEX *lex, uint phases)
{
- for (TABLE_LIST *cursor= (TABLE_LIST*) table_list.first;
- cursor;
- cursor= cursor->next_local)
- {
- if (cursor->is_view_or_derived() && cursor->handle_derived(lex, phases))
- return TRUE;
- }
- return FALSE;
+ return lex->handle_list_of_derived(table_list.first, phases);
}