summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2006-03-28 15:08:17 +0200
committerunknown <pem@mysql.com>2006-03-28 15:08:17 +0200
commit442383892ee708a39cfbfa86b58c03dd52489ffb (patch)
treef02d71717e4d6d52bddb4c7779cd7fda6071655c /sql/sp.cc
parent1d73c16b873084a14ca6d8119b83e3a3385debbf (diff)
parente550d6e7e3d73d3c2e3236036cff977545c39d4d (diff)
downloadmariadb-git-442383892ee708a39cfbfa86b58c03dd52489ffb.tar.gz
Merge mysql.com:/extern/mysql/bk/mysql-5.0-runtime
into mysql.com:/extern/mysql/5.0/bug17015/mysql-5.0-runtime mysql-test/r/sp-error.result: Auto merged mysql-test/t/sp-error.test: Auto merged sql/field.h: Auto merged sql/sp.cc: Auto merged
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;