From a31c2d3dfc4f4f8ddea0743d104fb1b6cb9a37a9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Nov 2004 14:34:00 +0200 Subject: 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 --- sql/parse_file.cc | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'sql/parse_file.cc') diff --git a/sql/parse_file.cc b/sql/parse_file.cc index f548c16d808..61b5b301503 100644 --- a/sql/parse_file.cc +++ b/sql/parse_file.cc @@ -350,7 +350,8 @@ sql_parse_prepare(const LEX_STRING *file_name, MEM_ROOT *mem_root, if (stat_info.st_size > INT_MAX-1) { - my_error(ER_FPARSER_TOO_BIG_FILE, MYF(0), file_name->str); + my_printf_error(ER_FPARSER_TOO_BIG_FILE, + ER(ER_FPARSER_TOO_BIG_FILE), MYF(0), file_name->str); DBUG_RETURN(0); } @@ -412,7 +413,8 @@ sql_parse_prepare(const LEX_STRING *file_name, MEM_ROOT *mem_root, frm_error: if (bad_format_errors) { - my_error(ER_FPARSER_BAD_HEADER, MYF(0), file_name->str); + my_printf_error(ER_FPARSER_BAD_HEADER, ER(ER_FPARSER_BAD_HEADER), MYF(0), + file_name->str); DBUG_RETURN(0); } else @@ -627,7 +629,8 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root, // it is comment if (!(ptr= strchr(ptr, '\n'))) { - my_error(ER_FPARSER_EOF_IN_COMMENT, MYF(0), line); + my_printf_error(ER_FPARSER_EOF_IN_COMMENT, + ER(ER_FPARSER_EOF_IN_COMMENT), MYF(0), line); DBUG_RETURN(TRUE); } ptr++; @@ -669,8 +672,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root, (LEX_STRING *)(base + parameter->offset)))) { - my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0), - parameter->name.str, line); + my_printf_error(ER_FPARSER_ERROR_IN_PARAMETER, + ER(ER_FPARSER_ERROR_IN_PARAMETER), MYF(0), + parameter->name.str, line); DBUG_RETURN(TRUE); } break; @@ -681,8 +685,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root, (LEX_STRING *) (base + parameter->offset)))) { - my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0), - parameter->name.str, line); + my_printf_error(ER_FPARSER_ERROR_IN_PARAMETER, + ER(ER_FPARSER_ERROR_IN_PARAMETER), MYF(0), + parameter->name.str, line); DBUG_RETURN(TRUE); } break; @@ -691,8 +696,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root, case FILE_OPTIONS_REV: if (!(eol= strchr(ptr, '\n'))) { - my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0), - parameter->name.str, line); + my_printf_error(ER_FPARSER_ERROR_IN_PARAMETER, + ER(ER_FPARSER_ERROR_IN_PARAMETER), MYF(0), + parameter->name.str, line); DBUG_RETURN(TRUE); } { @@ -709,8 +715,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root, /* yyyy-mm-dd HH:MM:SS = 19(PARSE_FILE_TIMESTAMPLENGTH) characters */ if (ptr[PARSE_FILE_TIMESTAMPLENGTH] != '\n') { - my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0), - parameter->name.str, line); + my_printf_error(ER_FPARSER_ERROR_IN_PARAMETER, + ER(ER_FPARSER_ERROR_IN_PARAMETER), MYF(0), + parameter->name.str, line); DBUG_RETURN(TRUE); } memcpy(val->str, ptr, PARSE_FILE_TIMESTAMPLENGTH); @@ -763,8 +770,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root, break; list_err_w_message: - my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0), - parameter->name.str, line); + my_printf_error(ER_FPARSER_ERROR_IN_PARAMETER, + ER(ER_FPARSER_ERROR_IN_PARAMETER), MYF(0), + parameter->name.str, line); list_err: if (change_mem) my_pthread_setspecific_ptr(THR_MALLOC, sql_mem); @@ -779,8 +787,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root, // skip unknown parameter if (!(ptr= strchr(ptr, '\n'))) { - my_error(ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER, MYF(0), - line); + my_printf_error(ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER, + ER(ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER), MYF(0), + line); DBUG_RETURN(TRUE); } ptr++; -- cgit v1.2.1