[MDEV-13753] CTE is not visible during view creation Created: 2017-09-07  Updated: 2017-11-06  Resolved: 2017-11-06

Status: Closed
Project: MariaDB Server
Component/s: Optimizer - CTE
Affects Version/s: 10.2
Fix Version/s: 10.2.11

Type: Bug Priority: Major
Reporter: Oleksandr Byelkin Assignee: Igor Babaev
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-13998 PREPARE still doesn't work as expecte... Closed
Relates
relates to MDEV-13436 PREPARE doesn't work as expected & th... Closed

 Description   

Following fails

USE test;
SET @sql_query = "
  CREATE OR REPLACE VIEW cte_test AS
   WITH  cte1  AS ( SELECT 1 )
    ,    cte2  AS ( SELECT * FROM cte1 )
    SELECT * FROM cte2;
";
PREPARE stmt FROM @sql_query;

It was mentioned in MDEV-13436



 Comments   
Comment by Igor Babaev [ 2017-11-06 ]

This bug was fixed by the patch for the bug mdev-13780.
A test case for the bug mdev-13753 was pushed into the 10.2 tree.

Generated at Thu Feb 08 08:08:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.