Allow unused Common Table Expressions
-------------------------------------
Key: CORE-5674
URL: http://tracker.firebirdsql.org/browse/CORE-5674
Project: Firebird Core
Issue Type: Improvement
Components: Engine
Reporter: Vlad Khorsun
When fixing bug CORE-1793 unused CTEs was forbidden - it was simplest solution
to avoid crash in the engine.
Crash happens due to uninitialized input parameters as unused CTE is not
handled by syntax analyzer at all.
But it is too stong limitation and users complains about it (not often but
anyway).
Improvement is to allow queries with unused CTEs and convert error "CTE "XXX"
is not used in query" into warning.
Also, it will handle unused CTEs by syntax analyzer and catch all errors, for
example
WITH RECURSIVE
X AS (SELECT R.RDB$RELATION_NAME FROM RDB$RELATIONS1 R WHERE
R.RDB$RELATION_ID = 1),
Y AS (SELECT R.RDB$RELATION_NAME FROM RDB$RELATIONS R WHERE R.RDB$RELATION_ID
= :ID2)
SELECT * FROM Y
currently works despite of reference on non-existing table RDB$RELATIONS1 in
CTE X
--
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