Skip to content
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

InlineDerivedTable doesn't maintain contained table's meta data in some cases #15656

Closed
lukaseder opened this issue Sep 29, 2023 · 2 comments
Closed

Comments

@lukaseder
Copy link
Member

lukaseder commented Sep 29, 2023

An InlineDerivedTable should maintain the contained table's meta data, such as Table::getPrimaryKey. It currently doesn't, which prevents using it in INSERT .. ON DUPLICATE KEY statements:

The reason is that InlineDerivedTable::removeWhere removes all the meta data.

@lukaseder lukaseder added this to the Version 3.19.0 milestone Sep 29, 2023
@lukaseder lukaseder added this to To do in 3.19 Other improvements via automation Sep 29, 2023
@lukaseder lukaseder changed the title InlineDerivedTable should override meta methods like Table::getPrimaryKey() and delegate to the actual table InlineDerivedTable should override meta methods like Table::getPrimaryKey and delegate to the actual table Sep 29, 2023
@lukaseder
Copy link
Member Author

The actual problem is in the implementation of the InlineDerivedTable::removeWhere method, which creates a new TableImpl that doesn't contain much of the original meta data

@lukaseder lukaseder changed the title InlineDerivedTable should override meta methods like Table::getPrimaryKey and delegate to the actual table InlineDerivedTable doesn't maintain contained table's meta data in some cases Sep 29, 2023
@lukaseder
Copy link
Member Author

I won't backport this fix as it is mainly necessary for #15632 only.

3.19 Other improvements automation moved this from To do to Done Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

1 participant