diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-08-15 14:58:42 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-08-15 14:58:42 +0400 |
commit | 3f7f0c6a290ceac5703a00060f8a5fdeef39fce6 (patch) | |
tree | 8c23ee1a34487587d77b7f99d90f9592d276e809 /sql/sp_head.cc | |
parent | 4d50594dfc758774f116d3919a2a039f95182f8e (diff) | |
download | mariadb-git-3f7f0c6a290ceac5703a00060f8a5fdeef39fce6.tar.gz |
MDEV-13531 Add Database_qualified_name::copy()
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index f9d3aa56458..650ac175d34 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -619,14 +619,7 @@ sp_head::init_sp_name(THD *thd, const sp_name *spname) DBUG_ASSERT(spname && spname->m_db.str && spname->m_db.length); /* We have to copy strings to get them into the right memroot. */ - - m_db.length= spname->m_db.length; - m_db.str= strmake_root(thd->mem_root, spname->m_db.str, spname->m_db.length); - - m_name.length= spname->m_name.length; - m_name.str= strmake_root(thd->mem_root, spname->m_name.str, - spname->m_name.length); - + Database_qualified_name::copy(mem_root, spname->m_db, spname->m_name); m_explicit_name= spname->m_explicit_name; spname->make_qname(thd, &m_qname); |