Skip to content

MDEV-26820 Added vcol info in temp field.#5139

Open
pranavktiwari wants to merge 1 commit into
10.11from
10.11-MDEV-26820
Open

MDEV-26820 Added vcol info in temp field.#5139
pranavktiwari wants to merge 1 commit into
10.11from
10.11-MDEV-26820

Conversation

@pranavktiwari
Copy link
Copy Markdown

@pranavktiwari pranavktiwari commented May 28, 2026

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.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.
@vuvova
Copy link
Copy Markdown
Member

vuvova commented May 28, 2026

why VALUE() is even allowed in this context?

@pranavktiwari
Copy link
Copy Markdown
Author

why VALUE() is even allowed in this context?

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 ?

@grooverdan grooverdan changed the title Added vcol info in temp field. MDEV-26820 Added vcol info in temp field. May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants