diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-07-31 17:34:59 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-07-31 17:34:59 +0400 |
commit | 4937474f862010c90f76bf879a70c1edf17e7c85 (patch) | |
tree | 2c95821a22c9c2fd83e06b4ad9fa7048c70be4c9 /sql/sp_head.h | |
parent | 716898755a308f7803eecd3e139e9c58603980c7 (diff) | |
download | mariadb-git-4937474f862010c90f76bf879a70c1edf17e7c85.tar.gz |
MDEV-13414 Fix the SP code to avoid excessive use of strlen
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r-- | sql/sp_head.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h index 1435bb460c3..f17a918cf50 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -689,7 +689,12 @@ public: void set_info(longlong created, longlong modified, const st_sp_chistics &chistics, sql_mode_t sql_mode); - void set_definer(const char *definer, uint definerlen); + void set_definer(const char *definer, uint definerlen) + { + AUTHID tmp; + tmp.parse(definer, definerlen); + m_definer.copy(mem_root, &tmp.user, &tmp.host); + } void set_definer(const LEX_CSTRING *user_name, const LEX_CSTRING *host_name) { m_definer.copy(mem_root, user_name, host_name); |