Skip to content

MDEV-38801 Item_sum & Item_cache implement deep_copy() - #5536

Open
mariadb-RexJohnston wants to merge 1 commit into
11.8from
11.8-MDEV-38801
Open

MDEV-38801 Item_sum & Item_cache implement deep_copy()#5536
mariadb-RexJohnston wants to merge 1 commit into
11.8from
11.8-MDEV-38801

Conversation

@mariadb-RexJohnston

Copy link
Copy Markdown
Member

{Item_cache,Item_cache_row,Item_sum}::deep_copy() currently call shallow_copy_with_checks(). This causes issues when a proper independent copy is required, e.g. in add_key_part called on a key with a value containing an item inherited from Item_cache. We implement a proper deep copy that shares no nodes with the source, and add a check to the default Item::deep_copy_with_checks to ensure this.

{Item_cache,Item_cache_row,Item_sum}::deep_copy() currently call
shallow_copy_with_checks().  This causes issues when a proper
independent copy is required, e.g. in add_key_part called on a key
with a value containing an item inherited from Item_cache.
We implement a proper deep copy that shares no nodes with the source,
and add a check to ensure this.
@mariadb-RexJohnston

Copy link
Copy Markdown
Member Author

I had to update a few things here, the walk update tripped me up and i had to move the assert check out of Item::deep_copy.

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.

2 participants