summaryrefslogtreecommitdiff
path: root/sql/sql_udf.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2004-11-12 14:34:00 +0200
committerbell@sanja.is.com.ua <>2004-11-12 14:34:00 +0200
commit31f7811183b6dd197cb7643abbe1b56cec72b602 (patch)
tree7591e416fa1685ed1e41707824091a5ca7f9c2c1 /sql/sql_udf.cc
parent5bf7a8c30b7fb3c21a8cd57b4dad9b05b2a3b521 (diff)
downloadmariadb-git-31f7811183b6dd197cb7643abbe1b56cec72b602.tar.gz
post-review fixes
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r--sql/sql_udf.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index d27b72c02a7..903b80e6949 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -369,7 +369,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
if (!initialized)
{
- my_error(ER_OUT_OF_RESOURCES, MYF(0));
+ my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
DBUG_RETURN(1);
}
@@ -380,19 +380,20 @@ int mysql_create_function(THD *thd,udf_func *udf)
*/
if (strchr(udf->dl, '/'))
{
- my_error(ER_UDF_NO_PATHS, MYF(0));
+ my_message(ER_UDF_NO_PATHS, ER(ER_UDF_NO_PATHS), MYF(0));
DBUG_RETURN(1);
}
if (udf->name.length > NAME_LEN)
{
- my_error(ER_TOO_LONG_IDENT, MYF(0), udf->name);
+ my_printf_error(ER_TOO_LONG_IDENT, ER(ER_TOO_LONG_IDENT), MYF(0),
+ udf->name);
DBUG_RETURN(1);
}
rw_wrlock(&THR_LOCK_udf);
if ((hash_search(&udf_hash,(byte*) udf->name.str, udf->name.length)))
{
- my_error(ER_UDF_EXISTS, MYF(0), udf->name);
+ my_printf_error(ER_UDF_EXISTS, ER(ER_UDF_EXISTS), MYF(0), udf->name);
goto err;
}
if (!(dl = find_udf_dl(udf->dl)))
@@ -401,7 +402,8 @@ int mysql_create_function(THD *thd,udf_func *udf)
{
DBUG_PRINT("error",("dlopen of %s failed, error: %d (%s)",
udf->dl,errno,dlerror()));
- my_error(ER_CANT_OPEN_LIBRARY, MYF(0), udf->dl, errno, dlerror());
+ my_printf_error(ER_CANT_OPEN_LIBRARY, ER(ER_CANT_OPEN_LIBRARY), MYF(0),
+ udf->dl, errno, dlerror());
goto err;
}
new_dl=1;
@@ -411,7 +413,8 @@ int mysql_create_function(THD *thd,udf_func *udf)
if (udf->func == NULL)
{
- my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), udf->name);
+ my_printf_error(ER_CANT_FIND_DL_ENTRY, ER(ER_CANT_FIND_DL_ENTRY), MYF(0),
+ udf->name);
goto err;
}
udf->name.str=strdup_root(&mem,udf->name.str);
@@ -445,7 +448,8 @@ int mysql_create_function(THD *thd,udf_func *udf)
close_thread_tables(thd);
if (error)
{
- my_error(ER_ERROR_ON_WRITE, MYF(0), "func@mysql", error);
+ my_printf_error(ER_ERROR_ON_WRITE, ER(ER_ERROR_ON_WRITE), MYF(0),
+ "func@mysql", error);
del_udf(u_d);
goto err;
}
@@ -468,14 +472,15 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
DBUG_ENTER("mysql_drop_function");
if (!initialized)
{
- my_error(ER_OUT_OF_RESOURCES, MYF(0));
+ my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
DBUG_RETURN(1);
}
rw_wrlock(&THR_LOCK_udf);
if (!(udf=(udf_func*) hash_search(&udf_hash,(byte*) udf_name->str,
(uint) udf_name->length)))
{
- my_error(ER_FUNCTION_NOT_DEFINED, MYF(0), udf_name->str);
+ my_printf_error(ER_FUNCTION_NOT_DEFINED, ER(ER_FUNCTION_NOT_DEFINED),
+ MYF(0), udf_name->str);
goto err;
}
del_udf(udf);