MDEV-38574 Rename cloning functions of class Item and descendants

Rename cloning methods of class Item and its descendants
in the following way:

   (from)            (to)
do_build_clone  -> deep_copy
   build_clone  -> deep_copy_with_checks

do_get_copy  -> shallow_copy
   get_copy  -> shallow_copy_with_checks

to better reflect their functionality.

Also make Item::deep_copy() and shallow_copy() protected.
Outside users should call deep_copy_with_checks()
and shallow_copy_with_checks().
This commit is contained in:
Oleg Smirnov 2026-01-19 17:04:46 +07:00 committed by Oleksandr "Sanja" Byelkin
commit f2b48e565c
28 changed files with 1464 additions and 629 deletions

View file

@ -137,7 +137,9 @@ public:
return name;
}
String *val_str(String *) override;
Item *do_get_copy(THD *thd) const override
protected:
Item *shallow_copy(THD *thd) const override
{ return get_item_copy<Item_func_xml_extractvalue>(thd, this); }
};
@ -158,7 +160,9 @@ public:
return name;
}
String *val_str(String *) override;
Item *do_get_copy(THD *thd) const override
protected:
Item *shallow_copy(THD *thd) const override
{ return get_item_copy<Item_func_xml_update>(thd, this); }
};