diff --git a/sql/item.h b/sql/item.h index e3a5b59f39f8..479fa27cb315 100644 --- a/sql/item.h +++ b/sql/item.h @@ -3329,6 +3329,8 @@ class Item_name_const final : public Item { } Item *pq_clone(THD *thd, SELECT_LEX *select) override; + bool pq_copy_from(THD *thd, SELECT_LEX *select, Item *item) override; + protected: type_conversion_status save_in_field_inner(Field *field, bool no_conversions) override { diff --git a/sql/pq_clone_item.cc b/sql/pq_clone_item.cc index bf861fb31e94..58a9a081664e 100644 --- a/sql/pq_clone_item.cc +++ b/sql/pq_clone_item.cc @@ -498,6 +498,13 @@ PQ_CLONE_DEF(Item_name_const) { } PQ_CLONE_RETURN +PQ_COPY_FROM_DEF(Item_name_const, Item) { + if (orig_item != nullptr) { + valid_args = orig_item->valid_args; + } + } +PQ_COPY_FROM_RETURN + /* Item_result_field start */ /* Item_func start */ PQ_COPY_FROM_DEF(Item_func, Item_result_field) {