h2database / h2database/h2database
CTE never ends
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.6k
- Forks
- 1.3k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 9
Description
The following CTE never ends in H2 2.3.232, although it does in MySQL:
with recursive
mutations(time, old, new) as (
select 1, 'A', 'B' union
select 2, 'B', 'C' union
select 3, 'B', 'B' union
select 4, 'A', 'A' union
select 5, 'C', 'B' union
select 6, 'C', 'C' union
select 7, 'A', 'B' union
select 8, 'D', 'E'
),
permutations(x, y) as (
select new, old from mutations union
select old, new from mutations
),
related(val) as (
select ? union
select x from related join permutations on y = val
)
select val from related order by 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use CTE.java.txt and the SQL reproducer as the starting point; run it on H2 2.3.232 and compare its behavior with MySQL. Done when the recursive CTE terminates and a regression test captures the expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100