diff options
author | pem@mysql.com <> | 2006-03-28 15:06:06 +0200 |
---|---|---|
committer | pem@mysql.com <> | 2006-03-28 15:06:06 +0200 |
commit | e51adff01c4969a36ecad010b64e47b04550648e (patch) | |
tree | 806a9c1f278cf9eda9bb79241459e29fdaa9b35f /sql/sp.cc | |
parent | 05826af9268264fd2195381b491a72bcf426d531 (diff) | |
download | mariadb-git-e51adff01c4969a36ecad010b64e47b04550648e.tar.gz |
Review fix for BUG#17015: Routine name truncation not an error
Diffstat (limited to 'sql/sp.cc')
-rw-r--r-- | sql/sp.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 53218aece56..93dfd68cef3 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -509,11 +509,10 @@ db_create_routine(THD *thd, int type, sp_head *sp) goto done; } - if ((system_charset_info->cset->numchars(system_charset_info, - sp->m_name.str, - sp->m_name.str+sp->m_name.length) * - table->field[MYSQL_PROC_FIELD_NAME]->charset()->mbmaxlen) > - table->field[MYSQL_PROC_FIELD_NAME]->field_length) + if (system_charset_info->cset->numchars(system_charset_info, + sp->m_name.str, + sp->m_name.str+sp->m_name.length) > + table->field[MYSQL_PROC_FIELD_NAME]->char_length()) { ret= SP_BAD_IDENTIFIER; goto done; |