Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.3.23
-
Ubuntu 18.04.4 LTS (Bionic Beaver) running in Docker
Description
When I wrap a statement containing two or more Common Table Expressions in a function, and one of those CTEs is JOINed to another CTE, executing the function will result in error code 1146, reporting that the first table that the CTE interacts with doesn't exist - even though it does.
Extracting the failing query and running it standalone works fine, the query will return the expected results.
I have attached sample SQL that replicates this behaviour.
Attachments
Issue Links
- duplicates
-
MDEV-23886 Reusing CTE inside a function fails with table doesn't exist
- Closed
- relates to
-
MDEV-16629 "Table Does Not Exist" Error from Recursive CTE Query Inside Function
- Closed