mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
post-review fixes
mysql-test/r/rpl_rotate_logs.result: removed host dependence in error messages mysql-test/t/rpl_rotate_logs.test: removed host dependence in error messages mysys/my_error.c: comment about using my_error family functions sql/filesort.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/ha_innodb.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/handler.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item_cmpfunc.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item_func.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item_strfunc.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item_subselect.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item_sum.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/lock.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/log.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/mysql_priv.h: error check moved to fill_record sql/mysqld.cc: fixed error messages sql/parse_file.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/protocol.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/protocol_cursor.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/repl_failsafe.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/set_var.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/slave.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sp.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sp_head.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sp_rcontext.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_acl.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_analyse.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_base.cc: changing my_error on my_message and my_printf_error where if they are prefered error check moved to fill_record sql/sql_class.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_class.h: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_db.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_delete.cc: changing my_error on my_message and my_printf_error where if they are prefered error check moved to fill_record sql/sql_handler.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_help.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_insert.cc: changing my_error on my_message and my_printf_error where if they are prefered error check moved to fill_record sql/sql_lex.cc: layout fixed sql/sql_load.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_map.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_parse.cc: error check moved to fill_record changing my_error on my_message and my_printf_error where if they are prefered sql/sql_prepare.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_rename.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_repl.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_select.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_show.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_table.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_trigger.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_udf.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_union.cc: error check moved to fill_record sql/sql_update.cc: error check moved to fill_record sql/sql_view.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_yacc.yy: changing my_error on my_message and my_printf_error where if they are prefered sql/table.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/unireg.cc: changing my_error on my_message and my_printf_error where if they are prefered
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user