summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-04-08 10:36:41 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-04-08 10:36:41 +0300
commitccc06931c3c7be094f6dcddeb45589f06cf0c8af (patch)
treeacfd8ed3cae2ee65cf6ddca6d96b907ea172d1dd /sql/field.cc
parent9075973dbf2ef69e95d427e3a979be23435692e3 (diff)
parent476966b3fb05ce8c061a4b77a0ab0b722bb0d192 (diff)
downloadmariadb-git-ccc06931c3c7be094f6dcddeb45589f06cf0c8af.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/field.cc')
-rw-r--r--sql/field.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc
index a2cfbe65294..04c45dfb546 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -11077,3 +11077,20 @@ void Field::print_key_value_binary(String *out, const uchar* key, uint32 length)
{
out->append_semi_hex((const char*)key, length, charset());
}
+
+
+Virtual_column_info* Virtual_column_info::clone(THD *thd)
+{
+ Virtual_column_info* dst= new (thd->mem_root) Virtual_column_info(*this);
+ if (!dst)
+ return NULL;
+ if (expr)
+ {
+ dst->expr= expr->get_copy(thd);
+ if (!dst->expr)
+ return NULL;
+ }
+ if (!thd->make_lex_string(&dst->name, name.str, name.length))
+ return NULL;
+ return dst;
+};