summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2020-01-26 20:27:13 +0400
committerAlexander Barkov <bar@mariadb.com>2020-01-28 12:29:23 +0400
commitf1e13fdc8d9e78f4529aa60b6a9b49c6ff063c66 (patch)
treece84da1deeea573be5be7db7d739a4c9ba9b40f8 /sql/sp.cc
parentdd68ba74f357aca074609cbd77491ed4ba390369 (diff)
downloadmariadb-git-f1e13fdc8d9e78f4529aa60b6a9b49c6ff063c66.tar.gz
MDEV-21581 Helper functions and methods for CHARSET_INFO
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 4e958aedc44..ae413fcf615 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2002, 2018, Oracle and/or its affiliates.
- Copyright (c) 2009, 2018, MariaDB
+ Copyright (c) 2009, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1283,9 +1283,8 @@ Sp_handler::sp_create_routine(THD *thd, const sp_head *sp) const
goto done;
}
- if (system_charset_info->cset->numchars(system_charset_info,
- sp->m_name.str,
- sp->m_name.str+sp->m_name.length) >
+ if (system_charset_info->numchars(sp->m_name.str,
+ sp->m_name.str + sp->m_name.length) >
table->field[MYSQL_PROC_FIELD_NAME]->char_length())
{
my_error(ER_TOO_LONG_IDENT, MYF(0), sp->m_name.str);