1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-13533 Remove the THD parameter from sp_head::init_sp_name()

This commit is contained in:
Alexander Barkov
2017-08-15 16:41:58 +04:00
parent 3f7f0c6a29
commit b5098f3dae
4 changed files with 7 additions and 7 deletions

View File

@ -5984,13 +5984,13 @@ public:
(int) m_name.length, m_name.str);
}
// Export db and name as a qualified name string, allocate on mem_root.
bool make_qname(THD *thd, LEX_CSTRING *dst) const
bool make_qname(MEM_ROOT *mem_root, LEX_CSTRING *dst) const
{
const uint dot= !!m_db.length;
char *tmp;
/* format: [database + dot] + name + '\0' */
dst->length= m_db.length + dot + m_name.length;
if (!(dst->str= tmp= (char*) thd->alloc(dst->length + 1)))
if (!(dst->str= tmp= (char*) alloc_root(mem_root, dst->length + 1)))
return true;
sprintf(tmp, "%.*s%.*s%.*s",
(int) m_db.length, (m_db.length ? m_db.str : ""),