diff options
author | Galina Shalygina <galashalygina@gmail.com> | 2016-05-08 23:04:41 +0300 |
---|---|---|
committer | Galina Shalygina <galashalygina@gmail.com> | 2016-05-08 23:04:41 +0300 |
commit | be1d06c8a5f843e775374e5ec148aaee56970bdc (patch) | |
tree | bd7a95e771ca3b405583dccab8b468dd6fb4509f /sql/sql_cte.cc | |
parent | e09b1f2a226bf2763b211f74908a6486b83ebed1 (diff) | |
download | mariadb-git-be1d06c8a5f843e775374e5ec148aaee56970bdc.tar.gz |
Merge branch '10.2' into 10.2-mdev9864
Diffstat (limited to 'sql/sql_cte.cc')
-rw-r--r-- | sql/sql_cte.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc index 1203a4ce0c8..77f0bcf04ba 100644 --- a/sql/sql_cte.cc +++ b/sql/sql_cte.cc @@ -512,7 +512,10 @@ With_element *st_select_lex::find_table_def_in_with_clauses(TABLE_LIST *table) { With_clause *with_clause=sl->get_with_clause(); if (with_clause && (found= with_clause->find_table_def(table))) - return found; + return found; + /* Do not look for the table's definition beyond the scope of the view */ + if (sl->master_unit()->is_view) + break; } return found; } |