-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
Regression with CREATE ALIAS - Parameter "#2" is not set #3334
Comments
Parser incorrectly reads the same parameter twice and assigns a new number to it.
|
There is an another workaround: |
As they say, reliance on exception handling for a normal flow control is rarely a good thing. 😄 |
That's why H2 should never allow expression and a table in the same context. Normal code flow is also affected, for example, in a semicolon-separated mix of DDL and DML commands. We don't support parameters in DDL, but parameters in DML can be numbered incorrectly. We need to assign numbers to parameters immediately, it should solve these issues. After recent changes it should be relatively simple. When current H2 splits commands, they use tokens for their own parsing after execution of previous DDL commands. It means we can assign numbers directly in tokenizer and store them in these tokens. |
With H2 1.4.200
With H2 2.0.202
The text was updated successfully, but these errors were encountered: