-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Assorted fixes #2836
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
Assorted fixes #2836
Conversation
| } | ||
| if (!hasColumn) { | ||
| throw DbException.getSyntaxError(sqlStatement, sqlStatement.length(), | ||
| "Valid MERGE INTO statement with at least one updatable column"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with -> without
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is what we expect and not what we found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we expect to "have at least one updateable column", but we did not find that.
So we should say
"Valid MERGE INTO statement requires at least one updatable column"
or
"MERGE INTO statement without at least one updatable column"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole error message is:
Syntax error in SQL statement "MERGE INTO T0(C0) KEY(C1) VALUES (1)[*]"; expected "Valid MERGE INTO statement with at least one updatable column"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you are correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It don't want to allocate a new error code for the normal error message for this specific corner case in non-standard command. This command has significant design problems, it can't handle GENERATED ALWAYS identity columns and generated columns well.
Closes #2831.
Closes #2833.
Closes #2835.
Also contains unrelated changes in value classes. Some code is moved from
ValuetoValueStringBaseandValueInterval.