Skip to content

Conversation

@katzyn
Copy link
Contributor

@katzyn katzyn commented Aug 19, 2020

Closes #2831.

Closes #2833.

Closes #2835.

Also contains unrelated changes in value classes. Some code is moved from Value to ValueStringBase and ValueInterval.

}
if (!hasColumn) {
throw DbException.getSyntaxError(sqlStatement, sqlStatement.length(),
"Valid MERGE INTO statement with at least one updatable column");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with -> without

Copy link
Contributor Author

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.

Copy link
Contributor

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"

Copy link
Contributor Author

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"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you are correct

Copy link
Contributor Author

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.

@katzyn katzyn merged commit 2b77de6 into h2database:master Aug 19, 2020
@katzyn katzyn deleted the misc branch August 19, 2020 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants