-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
UPDATE ... JOIN fails for tables containing capital letters #7958
Comments
@max-hoffman is also going to grab this one. |
This fix has been released in Dolt 1.39.4. Thanks for reporting this one! 🙏 |
Hmm this still seems to fail for me if I use an UPDATE targetTable_test
JOIN sourceTable_test
ON `sourceTable_test`.`id` = targetTable_test.source_id
SET
targetTable_test.value = `sourceTable_test`.value; Error: The culprit appears to be this function not changing to lower case for the map keys: https://github.com/dolthub/go-mysql-server/blob/6fcdd8a577b67ce92440ff6ed4d9fbac2c3c80af/sql/planbuilder/dml.go#L608-L618 (the original fix seems to have fixed the issue in another near-identical function in another file) Should I open a separate ticket for this one? |
@arvidfm thanks for pointing this out. I added the fix here dolthub/go-mysql-server#2540. We are happy to usher PRs through in the future if you send them our way. |
@max-hoffman Amazing, thank you for the quick response! |
The below query fails with the error message
The target table targettable_test of the UPDATE is not updatable
:It works fine if you avoid uppercase letters in the table name, or if you use an alias in the query that doesn't contain uppercase letters, so it seems to be an issue with case insensitivity handling. We have quite a few tables that use capital letters (mostly for legacy reasons), and having to ensure that every update query involving them uses an alias would be a bit too error prone.
MWE confirmed to work with Percona Server 8.3:
The text was updated successfully, but these errors were encountered: