summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorpem@mysql.com <>2006-03-28 15:08:17 +0200
committerpem@mysql.com <>2006-03-28 15:08:17 +0200
commite0a2455f1913f890dcdd6bfd5602fd63218ceca6 (patch)
treef02d71717e4d6d52bddb4c7779cd7fda6071655c /sql/sp.cc
parent71defb7a8020e0797cdc3b7b68c1c96adcb7a4e6 (diff)
parente51adff01c4969a36ecad010b64e47b04550648e (diff)
downloadmariadb-git-e0a2455f1913f890dcdd6bfd5602fd63218ceca6.tar.gz
Merge mysql.com:/extern/mysql/bk/mysql-5.0-runtime
into mysql.com:/extern/mysql/5.0/bug17015/mysql-5.0-runtime
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 0446bf94e53..cfcf011032d 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -534,7 +534,11 @@ db_create_routine(THD *thd, int type, sp_head *sp)
ret= SP_GET_FIELD_FAILED;
goto done;
}
- if (sp->m_name.length > 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;