Regression in 3.0+: message "CTE 'X' has cyclic dependencies"  appear when 'X' 
is alias for resultset and there is previous CTE part with the same name 'X' in 
the query
------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: CORE-5667
                 URL: http://tracker.firebirdsql.org/browse/CORE-5667
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 4.0 Alpha 1, 3.0.2
            Reporter: Pavel Zotov


This query works fine:
==================
with
x as(
  select 1 i from rdb$database
)
,y as(
  select i from x
)
select * from y as z
;

But this fails:
==========

with
x as(
  select 1 i from rdb$database
)
,y as(
  select i from x
)
select * from y as x ------------------ NOTE: "as X", i.e. alias for final CTE 
part ( "y" ) matches to 1st CTE ( "x" )
;

Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-CTE 'X' has cyclic dependencies

Regression affected only 3.0+.
All builds of 2.5 work Ok (i've checked 2.5.0 ... 2.5.6 and current build of 
2.5.8).


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to