MDEV-26820 Added vcol info in temp field.#5139
Open
pranavktiwari wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates sql/item.cc within the Item_insert_value::fix_fields function to copy the virtual column information (vcol_info) from the source field to the temporary field. There are no review comments, so I have no feedback to provide.
Preserve vcol_info when creating temporary fields in Item_insert_value::fix_fields() so VALUE()/VALUES() works correctly with virtual columns and does not lose dependency tracking.
dae1eda to
e546752
Compare
Member
|
why |
Author
Yes, it should not be allowed, but VALUE() is currently accepted by the parser in this context. If VALUE() is not expected in this context, it needs a separate parser restriction ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes MDEV-26820
Problem:
Item_insert_value::fix_fields() created a temporary field
without preserving vcol_info. As a result, VALUE()/VALUES()
on virtual columns lost dependency metadata and could trigger:
Assertion `marked_for_read()' failed during virtual column evaluation.
Cause:
The temporary Field_string copied field_index but did not copy virtual column metadata from the original field.
Fix:
Preserve vcol_info when creating temporary fields in Item_insert_value::fix_fields() so virtual column dependency
tracking remains intact.