summaryrefslogtreecommitdiff
path: root/sql/sql_cte.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2023-01-21 00:09:58 -0800
committerIgor Babaev <igor@askmonty.org>2023-01-23 11:51:48 -0800
commit074bef4dcaad15dba40013e9d2ddf0011b7744a1 (patch)
tree528a5963969e662e359aaf3aaaf9f444062ef610 /sql/sql_cte.h
parentf18c2b6c8a92475f685ce60c495faddc5aaab011 (diff)
downloadmariadb-git-074bef4dcaad15dba40013e9d2ddf0011b7744a1.tar.gz
MDEV-30248 Infinite sequence of recursive calls when processing embedded CTE
This patch fixes the patch for bug MDEV-30248 that unsatisfactorily resolved the problem of resolution of references to CTE. In some cases when such a reference has the same table name as the name of one of CTEs containing this reference the reference could be resolved incorrectly that led to an invalid select tree where units could be mutually dependent. This in its turn could lead to an infinite sequence of recursive calls or to falls into infinite loops. The patch also removes LEX::resolve_references_to_cte_in_hanging_cte() as with the new code for resolution of CTE references the call of this function is not needed anymore. Approved by Oleksandr Byelkin <sanja@mariadb.com>
Diffstat (limited to 'sql/sql_cte.h')
-rw-r--r--sql/sql_cte.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/sql/sql_cte.h b/sql/sql_cte.h
index b2708186008..d9dda3e227b 100644
--- a/sql/sql_cte.h
+++ b/sql/sql_cte.h
@@ -322,8 +322,6 @@ public:
friend
bool LEX::resolve_references_to_cte(TABLE_LIST *tables,
TABLE_LIST **tables_last);
- friend
- bool LEX::resolve_references_to_cte_in_hanging_cte();
};
const uint max_number_of_elements_in_with_clause= sizeof(table_map)*8;
@@ -435,9 +433,6 @@ public:
friend
bool LEX::check_dependencies_in_with_clauses();
-
- friend
- bool LEX::resolve_references_to_cte_in_hanging_cte();
};
inline