Problem with Recursive CTE with "deep tree"
-------------------------------------------

                 Key: CORE-4456
                 URL: http://tracker.firebirdsql.org/browse/CORE-4456
             Project: Firebird Core
          Issue Type: Bug
         Environment: Windows 7 32 bits / Firebird embedded
            Reporter: BenLaz


Hello,

I have a problem with a CTE Query (recursive). Here is the query :

WITH RECURSIVE BTREE (ID) AS
      (SELECT ID
       FROM BINDERS WHERE PARENTID = 0
       UNION ALL SELECT L.ID
       FROM BINDERS L 
       INNER JOIN BTREE T ON T.ID = L.PARENTID)
SELECT BINDERS.* FROM BTREE INNER JOIN BINDERS ON BINDERS.ID = BTREE.ID

The table Binders have the folowing structure :

ID : Int not null primary key
PARENTID : Int not null
BINDERNAME : varchar(100)

And it's filled that way :

1, 0, 'toto'
2, 1, 'toto'   
3, 2, 'toto'   
4, 3, 'toto'  
. 
.
.
10000, 9999, 'toto'

When executing the request there is no problem, but when retrieving the results 
there is an error : Fetch "too many concurrent executions of the same request".

This can be reproduced either with a lazarus program or FlameRobin

Best regards

-- 
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

        

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://www.hpccsystems.com
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to