We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CTEs with the same name, in different scopes can cause incorrect query results.
Consider the following statement with two CTEs at different scopes, both named cte:
cte
WITH cte(id) AS ( SELECT 0 from dual ) SELECT cte.id FROM cte where cte.id in ( WITH cte(id) AS ( SELECT 42 from dual ) select id from cte );
MySQL returns:
Empty set (0.01 sec)
Dolt returns:
+----+ | id | +----+ | 42 | +----+ 1 row in set (0.00 sec)
Dolt doesn't seem to correctly distinguish between the two CTEs with the same name.
Changing the name of the second CTE, as in the statement below, causes Dolt to return the same result as MySQL:
WITH cte(id) AS ( SELECT 0 from dual ) SELECT cte.id FROM cte where cte.id in ( WITH cte2(id) AS ( SELECT 42 from dual ) select id from cte2 );
The text was updated successfully, but these errors were encountered:
fix is merged to main
Sorry, something went wrong.
jycor
No branches or pull requests
CTEs with the same name, in different scopes can cause incorrect query results.
Consider the following statement with two CTEs at different scopes, both named
cte
:MySQL returns:
Dolt returns:
Dolt doesn't seem to correctly distinguish between the two CTEs with the same name.
Changing the name of the second CTE, as in the statement below, causes Dolt to return the same result as MySQL:
The text was updated successfully, but these errors were encountered: