mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 17:54:16 +01:00
mysys: rename ME_xxx flags to match plugin api
This commit is contained in:
parent
37659ef43b
commit
c9061d1102
56 changed files with 138 additions and 146 deletions
|
@ -104,11 +104,11 @@ typedef struct my_aio_result {
|
|||
#define MY_GIVE_INFO 2U /* Give time info about process*/
|
||||
#define MY_DONT_FREE_DBUG 4U /* Do not call DBUG_END() in my_end() */
|
||||
|
||||
#define ME_BELL 4U /* Ring bell then printing message */
|
||||
#define ME_NOREFRESH 64U /* Write the error message to error log */
|
||||
#define ME_JUST_INFO 1024U /**< not error but just info */
|
||||
#define ME_JUST_WARNING 2048U /**< not error but just warning */
|
||||
#define ME_FATALERROR 4096U /* Fatal statement error */
|
||||
#define ME_BELL 4U /* Ring bell then printing message */
|
||||
#define ME_ERROR_LOG 64 /**< write the error message to error log */
|
||||
#define ME_NOTE 1024 /**< not error but just info */
|
||||
#define ME_WARNING 2048 /**< not error but just warning */
|
||||
#define ME_FATAL 4096 /**< fatal statement error */
|
||||
|
||||
/* Bits in last argument to fn_format */
|
||||
#define MY_REPLACE_DIR 1U /* replace dir in name with 'dir' */
|
||||
|
|
|
@ -107,12 +107,12 @@ void init_glob_errs()
|
|||
void wait_for_free_space(const char *filename, int errors)
|
||||
{
|
||||
if (errors == 0)
|
||||
my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH | ME_JUST_WARNING),
|
||||
my_error(EE_DISK_FULL,MYF(ME_BELL | ME_ERROR_LOG | ME_WARNING),
|
||||
filename,my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
|
||||
if (!(errors % MY_WAIT_GIVE_USER_A_MESSAGE))
|
||||
my_printf_error(EE_DISK_FULL,
|
||||
"Retry in %d secs. Message reprinted in %d secs",
|
||||
MYF(ME_BELL | ME_NOREFRESH | ME_JUST_WARNING),
|
||||
MYF(ME_BELL | ME_ERROR_LOG | ME_WARNING),
|
||||
MY_WAIT_FOR_USER_TO_FIX_PANIC,
|
||||
MY_WAIT_GIVE_USER_A_MESSAGE * MY_WAIT_FOR_USER_TO_FIX_PANIC );
|
||||
(void) sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC);
|
||||
|
|
|
@ -576,7 +576,7 @@ int init_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache,
|
|||
if (blocks < 8)
|
||||
{
|
||||
my_errno= ENOMEM;
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_FATALERROR),
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_FATAL),
|
||||
blocks * keycache->key_cache_block_size);
|
||||
goto err;
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
|
|||
|
||||
length+=ALIGN_SIZE(sizeof(USED_MEM));
|
||||
if (!(next = (USED_MEM*) my_malloc(length,
|
||||
MYF(MY_WME | ME_FATALERROR |
|
||||
MYF(MY_WME | ME_FATAL |
|
||||
MALLOC_FLAG(mem_root->block_size)))))
|
||||
{
|
||||
if (mem_root->error_handler)
|
||||
|
@ -247,7 +247,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
|
|||
get_size= MY_MAX(get_size, block_size);
|
||||
|
||||
if (!(next = (USED_MEM*) my_malloc(get_size,
|
||||
MYF(MY_WME | ME_FATALERROR |
|
||||
MYF(MY_WME | ME_FATAL |
|
||||
MALLOC_FLAG(mem_root->
|
||||
block_size)))))
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ uchar *my_malloc_lock(uint size,myf MyFlags)
|
|||
if (!(ptr=memalign(pagesize,size)))
|
||||
{
|
||||
if (MyFlags & (MY_FAE+MY_WME))
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATALERROR), size);
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), size);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
success = mlock((uchar*) ptr,size);
|
||||
|
|
|
@ -106,7 +106,7 @@ void *my_malloc(size_t size, myf my_flags)
|
|||
if (my_flags & MY_FAE)
|
||||
error_handler_hook=fatal_error_handler_hook;
|
||||
if (my_flags & (MY_FAE+MY_WME))
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_NOREFRESH+ME_FATALERROR),size);
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG+ME_FATAL),size);
|
||||
if (my_flags & MY_FAE)
|
||||
abort();
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ void *my_realloc(void *oldpoint, size_t size, myf my_flags)
|
|||
DBUG_RETURN(oldpoint);
|
||||
my_errno=errno;
|
||||
if (my_flags & (MY_FAE+MY_WME))
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_FATALERROR), size);
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_FATAL), size);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ void* my_once_alloc(size_t Size, myf MyFlags)
|
|||
{
|
||||
my_errno=errno;
|
||||
if (MyFlags & (MY_FAE+MY_WME))
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATALERROR), get_size);
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size);
|
||||
return((uchar*) 0);
|
||||
}
|
||||
DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size));
|
||||
|
|
|
@ -101,7 +101,7 @@ int my_close(File fd, myf MyFlags)
|
|||
DBUG_PRINT("error",("Got error %d on close",err));
|
||||
my_errno=errno;
|
||||
if (MyFlags & (MY_FAE | MY_WME))
|
||||
my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
|
||||
my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
|
||||
name,errno);
|
||||
}
|
||||
if (name)
|
||||
|
@ -156,7 +156,7 @@ File my_register_filename(File fd, const char *FileName, enum file_type
|
|||
if (my_errno == EMFILE)
|
||||
error_message_number= EE_OUT_OF_FILERESOURCES;
|
||||
my_error(error_message_number,
|
||||
MYF(ME_BELL | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
|
||||
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
|
||||
FileName, my_errno);
|
||||
}
|
||||
DBUG_RETURN(-1);
|
||||
|
|
|
@ -86,11 +86,11 @@ size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset,
|
|||
{
|
||||
if (readbytes == (size_t) -1)
|
||||
my_error(EE_READ,
|
||||
MYF(ME_BELL | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
|
||||
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
|
||||
my_filename(Filedes),my_errno);
|
||||
else if (MyFlags & (MY_NABP | MY_FNABP))
|
||||
my_error(EE_EOFERR,
|
||||
MYF(ME_BELL | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
|
||||
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
|
||||
my_filename(Filedes),my_errno);
|
||||
}
|
||||
if (readbytes == (size_t) -1 || (MyFlags & (MY_FNABP | MY_NABP)))
|
||||
|
@ -173,7 +173,7 @@ size_t my_pwrite(int Filedes, const uchar *Buffer, size_t Count,
|
|||
if (MyFlags & (MY_NABP | MY_FNABP))
|
||||
{
|
||||
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
|
||||
my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
|
||||
my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
|
||||
my_filename(Filedes),my_errno);
|
||||
DBUG_RETURN(MY_FILE_ERROR); /* Error on write */
|
||||
}
|
||||
|
|
|
@ -90,11 +90,11 @@ size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags)
|
|||
{
|
||||
if (readbytes == (size_t) -1)
|
||||
my_error(EE_READ,
|
||||
MYF(ME_BELL | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
|
||||
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
|
||||
my_filename(Filedes), got_errno);
|
||||
else if (MyFlags & (MY_NABP | MY_FNABP))
|
||||
my_error(EE_EOFERR,
|
||||
MYF(ME_BELL | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
|
||||
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
|
||||
my_filename(Filedes), got_errno);
|
||||
}
|
||||
if (readbytes == (size_t) -1 ||
|
||||
|
|
|
@ -27,7 +27,7 @@ struct passwd *my_check_user(const char *user, myf MyFlags)
|
|||
my_errno= EPERM;
|
||||
if (MyFlags & MY_WME)
|
||||
my_printf_error(my_errno, "One can only use the --user switch if "
|
||||
"running as root", MYF(ME_JUST_WARNING|ME_NOREFRESH));
|
||||
"running as root", MYF(ME_WARNING|ME_ERROR_LOG));
|
||||
}
|
||||
}
|
||||
DBUG_RETURN(NULL);
|
||||
|
@ -38,7 +38,7 @@ struct passwd *my_check_user(const char *user, myf MyFlags)
|
|||
{
|
||||
my_errno= EINVAL;
|
||||
my_printf_error(my_errno, "Please consult the Knowledge Base to find "
|
||||
"out how to run mysqld as root!", MYF(ME_NOREFRESH));
|
||||
"out how to run mysqld as root!", MYF(ME_ERROR_LOG));
|
||||
}
|
||||
DBUG_RETURN(NULL);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ struct passwd *my_check_user(const char *user, myf MyFlags)
|
|||
{
|
||||
my_errno= EINVAL;
|
||||
my_printf_error(my_errno, "Can't change to run as user '%s'. Please "
|
||||
"check that the user exists!", MYF(ME_NOREFRESH), user);
|
||||
"check that the user exists!", MYF(ME_ERROR_LOG), user);
|
||||
DBUG_RETURN(NULL);
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ int my_set_user(const char *user, struct passwd *user_info, myf MyFlags)
|
|||
{
|
||||
my_errno= errno;
|
||||
if (MyFlags & MY_WME)
|
||||
my_printf_error(errno, "Cannot change uid/gid (errno: %d)", MYF(ME_NOREFRESH),
|
||||
my_printf_error(errno, "Cannot change uid/gid (errno: %d)", MYF(ME_ERROR_LOG),
|
||||
errno);
|
||||
DBUG_RETURN(my_errno);
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags)
|
|||
{
|
||||
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
|
||||
{
|
||||
my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_JUST_INFO | ME_NOREFRESH))),
|
||||
my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
|
||||
my_filename(Filedes),my_errno);
|
||||
}
|
||||
DBUG_RETURN(MY_FILE_ERROR); /* Error on read */
|
||||
|
|
|
@ -549,13 +549,13 @@ static int rotate_single_key(uint key_id)
|
|||
|
||||
if (!ver)
|
||||
{
|
||||
my_printf_error(ER_UNKNOWN_ERROR, "key %u does not exist", MYF(ME_JUST_WARNING), key_id);
|
||||
my_printf_error(ER_UNKNOWN_ERROR, "key %u does not exist", MYF(ME_WARNING), key_id);
|
||||
return -1;
|
||||
}
|
||||
else if (generate_and_save_datakey(key_id, ver + 1))
|
||||
{
|
||||
my_printf_error(ER_UNKNOWN_ERROR, "Could not generate datakey for key id= %u, ver= %u",
|
||||
MYF(ME_JUST_WARNING), key_id, ver);
|
||||
MYF(ME_WARNING), key_id, ver);
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
|
@ -566,7 +566,7 @@ static int rotate_single_key(uint key_id)
|
|||
if (load_key(&info))
|
||||
{
|
||||
my_printf_error(ER_UNKNOWN_ERROR, "Could not load datakey for key id= %u, ver= %u",
|
||||
MYF(ME_JUST_WARNING), key_id, ver);
|
||||
MYF(ME_WARNING), key_id, ver);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -591,7 +591,7 @@ static void update_rotate(MYSQL_THD, struct st_mysql_sys_var *, void *, const vo
|
|||
if (!master_key_id[0])
|
||||
{
|
||||
my_printf_error(ER_UNKNOWN_ERROR,
|
||||
"aws_key_management_master_key_id must be set to generate new data keys", MYF(ME_JUST_WARNING));
|
||||
"aws_key_management_master_key_id must be set to generate new data keys", MYF(ME_WARNING));
|
||||
return;
|
||||
}
|
||||
mtx.lock();
|
||||
|
|
|
@ -733,7 +733,7 @@ static int user_coll_fill(struct user_coll *c, char *users,
|
|||
internal_stop_logging= 1;
|
||||
CLIENT_ERROR(1, "User '%.*s' was removed from the"
|
||||
" server_audit_excl_users.",
|
||||
MYF(ME_JUST_WARNING), (int) cmp_length, users);
|
||||
MYF(ME_WARNING), (int) cmp_length, users);
|
||||
internal_stop_logging= 0;
|
||||
blank_user(cmp_user);
|
||||
refill_cmp_coll= 1;
|
||||
|
@ -742,7 +742,7 @@ static int user_coll_fill(struct user_coll *c, char *users,
|
|||
{
|
||||
internal_stop_logging= 1;
|
||||
CLIENT_ERROR(1, "User '%.*s' is in the server_audit_incl_users, "
|
||||
"so wasn't added.", MYF(ME_JUST_WARNING), (int) cmp_length, users);
|
||||
"so wasn't added.", MYF(ME_WARNING), (int) cmp_length, users);
|
||||
internal_stop_logging= 0;
|
||||
remove_user(users);
|
||||
continue;
|
||||
|
@ -1050,7 +1050,7 @@ static int start_logging()
|
|||
"Could not create file '%s'.", alt_fname);
|
||||
is_active= 0;
|
||||
CLIENT_ERROR(1, "SERVER AUDIT plugin can't create file '%s'.",
|
||||
MYF(ME_JUST_WARNING), alt_fname);
|
||||
MYF(ME_WARNING), alt_fname);
|
||||
return 1;
|
||||
}
|
||||
error_header();
|
||||
|
@ -2593,7 +2593,7 @@ static void update_file_path(MYSQL_THD thd,
|
|||
{
|
||||
error_header();
|
||||
fprintf(stderr, "Logging was disabled..\n");
|
||||
CLIENT_ERROR(1, "Logging was disabled.", MYF(ME_JUST_WARNING));
|
||||
CLIENT_ERROR(1, "Logging was disabled.", MYF(ME_WARNING));
|
||||
}
|
||||
goto exit_func;
|
||||
}
|
||||
|
@ -2763,7 +2763,7 @@ static void update_logging(MYSQL_THD thd,
|
|||
start_logging();
|
||||
if (!logging)
|
||||
{
|
||||
CLIENT_ERROR(1, "Logging was disabled.", MYF(ME_JUST_WARNING));
|
||||
CLIENT_ERROR(1, "Logging was disabled.", MYF(ME_WARNING));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -401,7 +401,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data)
|
|||
my_message_sql(ER_STARTUP,
|
||||
"Event Error: An error occurred while creating query "
|
||||
"string, before writing it into binary log.",
|
||||
MYF(ME_NOREFRESH));
|
||||
MYF(ME_ERROR_LOG));
|
||||
ret= true;
|
||||
}
|
||||
else
|
||||
|
@ -926,7 +926,7 @@ Events::init(THD *thd, bool opt_noacl_or_bootstrap)
|
|||
my_message(ER_STARTUP,
|
||||
"Event Scheduler: An error occurred when initializing "
|
||||
"system tables. Disabling the Event Scheduler.",
|
||||
MYF(ME_NOREFRESH));
|
||||
MYF(ME_ERROR_LOG));
|
||||
/* Disable the scheduler since the system tables are not up to date */
|
||||
opt_event_scheduler= EVENTS_OFF;
|
||||
goto end;
|
||||
|
@ -948,7 +948,7 @@ Events::init(THD *thd, bool opt_noacl_or_bootstrap)
|
|||
{
|
||||
my_message_sql(ER_STARTUP,
|
||||
"Event Scheduler: Error while loading from mysql.event table.",
|
||||
MYF(ME_NOREFRESH));
|
||||
MYF(ME_ERROR_LOG));
|
||||
res= TRUE; /* fatal error: request unireg_abort */
|
||||
goto end;
|
||||
}
|
||||
|
@ -1165,7 +1165,7 @@ Events::load_events_from_db(THD *thd)
|
|||
{
|
||||
my_message_sql(ER_STARTUP,
|
||||
"Event Scheduler: Failed to open table mysql.event",
|
||||
MYF(ME_NOREFRESH));
|
||||
MYF(ME_ERROR_LOG));
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
|
@ -1191,7 +1191,7 @@ Events::load_events_from_db(THD *thd)
|
|||
"Event Scheduler: "
|
||||
"Error while loading events from mysql.event. "
|
||||
"The table probably contains bad data or is corrupted",
|
||||
MYF(ME_NOREFRESH));
|
||||
MYF(ME_ERROR_LOG));
|
||||
delete et;
|
||||
goto end;
|
||||
}
|
||||
|
@ -1230,9 +1230,9 @@ Events::load_events_from_db(THD *thd)
|
|||
}
|
||||
my_printf_error(ER_STARTUP,
|
||||
"Event Scheduler: Loaded %d event%s",
|
||||
MYF(ME_NOREFRESH |
|
||||
MYF(ME_ERROR_LOG |
|
||||
(global_system_variables.log_warnings) ?
|
||||
ME_JUST_INFO: 0),
|
||||
ME_NOTE: 0),
|
||||
count, (count == 1) ? "" : "s");
|
||||
ret= FALSE;
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
|
|||
}
|
||||
if (memory_available < min_sort_memory)
|
||||
{
|
||||
my_error(ER_OUT_OF_SORTMEMORY,MYF(ME_ERROR + ME_FATALERROR));
|
||||
my_error(ER_OUT_OF_SORTMEMORY,MYF(ME_ERROR_LOG + ME_FATAL));
|
||||
goto err;
|
||||
}
|
||||
tracker->report_sort_buffer_size(sort->sort_buffer_size());
|
||||
|
@ -872,7 +872,7 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select,
|
|||
DBUG_PRINT("test",("error: %d indexpos: %d",error,indexpos));
|
||||
if (unlikely(error != HA_ERR_END_OF_FILE))
|
||||
{
|
||||
file->print_error(error,MYF(ME_ERROR));
|
||||
file->print_error(error,MYF(ME_ERROR_LOG));
|
||||
DBUG_RETURN(HA_POS_ERROR);
|
||||
}
|
||||
if (indexpos && idx &&
|
||||
|
|
|
@ -6808,7 +6808,7 @@ FT_INFO *ha_partition::ft_init_ext(uint flags, uint inx, String *key)
|
|||
sizeof(FT_INFO *) * m_tot_parts,
|
||||
NullS)))
|
||||
{
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
|
||||
DBUG_RETURN(NULL);
|
||||
}
|
||||
ft_target->part_ft_info= tmp_ft_info;
|
||||
|
|
|
@ -295,7 +295,7 @@ handler *get_ha_partition(partition_info *part_info)
|
|||
}
|
||||
else
|
||||
{
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR),
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATAL),
|
||||
static_cast<int>(sizeof(ha_partition)));
|
||||
}
|
||||
DBUG_RETURN(((handler*) partition));
|
||||
|
@ -2543,7 +2543,7 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
|
|||
dummy_share.table_name= *alias;
|
||||
dummy_table.alias.set(alias->str, alias->length, table_alias_charset);
|
||||
file->change_table_ptr(&dummy_table, &dummy_share);
|
||||
file->print_error(error, MYF(intercept ? ME_JUST_WARNING : 0));
|
||||
file->print_error(error, MYF(intercept ? ME_WARNING : 0));
|
||||
}
|
||||
if (intercept)
|
||||
error= 0;
|
||||
|
@ -3561,7 +3561,7 @@ void handler::print_error(int error, myf errflag)
|
|||
if (ha_thd()->transaction_rollback_request)
|
||||
{
|
||||
/* Ensure this becomes a true error */
|
||||
errflag&= ~(ME_JUST_WARNING | ME_JUST_INFO);
|
||||
errflag&= ~(ME_WARNING | ME_NOTE);
|
||||
}
|
||||
|
||||
int textno= -1; // impossible value
|
||||
|
@ -3696,14 +3696,14 @@ void handler::print_error(int error, myf errflag)
|
|||
{
|
||||
textno=ER_RECORD_FILE_FULL;
|
||||
/* Write the error message to error log */
|
||||
errflag|= ME_NOREFRESH;
|
||||
errflag|= ME_ERROR_LOG;
|
||||
break;
|
||||
}
|
||||
case HA_ERR_INDEX_FILE_FULL:
|
||||
{
|
||||
textno=ER_INDEX_FILE_FULL;
|
||||
/* Write the error message to error log */
|
||||
errflag|= ME_NOREFRESH;
|
||||
errflag|= ME_ERROR_LOG;
|
||||
break;
|
||||
}
|
||||
case HA_ERR_LOCK_WAIT_TIMEOUT:
|
||||
|
@ -3830,14 +3830,14 @@ void handler::print_error(int error, myf errflag)
|
|||
if (unlikely(fatal_error))
|
||||
{
|
||||
/* Ensure this becomes a true error */
|
||||
errflag&= ~(ME_JUST_WARNING | ME_JUST_INFO);
|
||||
errflag&= ~(ME_WARNING | ME_NOTE);
|
||||
if ((debug_assert_if_crashed_table ||
|
||||
global_system_variables.log_warnings > 1))
|
||||
{
|
||||
/*
|
||||
Log error to log before we crash or if extended warnings are requested
|
||||
*/
|
||||
errflag|= ME_NOREFRESH;
|
||||
errflag|= ME_ERROR_LOG;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4009,7 +4009,8 @@ static bool update_frm_version(TABLE *table)
|
|||
|
||||
int4store(version, MYSQL_VERSION_ID);
|
||||
|
||||
if ((result= (int)mysql_file_pwrite(file, (uchar*) version, 4, 51L, MYF_RW)))
|
||||
if ((result= (int)mysql_file_pwrite(file, (uchar*) version, 4, 51L,
|
||||
MYF(MY_WME+MY_NABP))))
|
||||
goto err;
|
||||
|
||||
table->s->mysql_version= MYSQL_VERSION_ID;
|
||||
|
@ -4929,7 +4930,7 @@ int ha_create_table(THD *thd, const char *path,
|
|||
{
|
||||
if (!thd->is_error())
|
||||
my_error(ER_CANT_CREATE_TABLE, MYF(0), db, table_name, error);
|
||||
table.file->print_error(error, MYF(ME_JUST_WARNING));
|
||||
table.file->print_error(error, MYF(ME_WARNING));
|
||||
PSI_CALL_drop_table_share(temp_table, share.db.str, (uint)share.db.length,
|
||||
share.table_name.str, (uint)share.table_name.length);
|
||||
}
|
||||
|
|
|
@ -3726,7 +3726,7 @@ longlong Item_master_pos_wait::val_int()
|
|||
connection_name.length= con->length();
|
||||
if (check_master_connection_name(&connection_name))
|
||||
{
|
||||
my_error(ER_WRONG_ARGUMENTS, MYF(ME_JUST_WARNING),
|
||||
my_error(ER_WRONG_ARGUMENTS, MYF(ME_WARNING),
|
||||
"MASTER_CONNECTION_NAME");
|
||||
goto err;
|
||||
}
|
||||
|
@ -4437,7 +4437,7 @@ user_var_entry *get_variable(HASH *hash, LEX_CSTRING *name,
|
|||
if (!my_hash_inited(hash))
|
||||
return 0;
|
||||
if (!(entry = (user_var_entry*) my_malloc(size,
|
||||
MYF(MY_WME | ME_FATALERROR |
|
||||
MYF(MY_WME | ME_FATAL |
|
||||
MY_THREAD_SPECIFIC))))
|
||||
return 0;
|
||||
entry->name.str=(char*) entry+ ALIGN_SIZE(sizeof(user_var_entry))+
|
||||
|
@ -4691,7 +4691,7 @@ update_hash(user_var_entry *entry, bool set_null, void *ptr, size_t length,
|
|||
entry->value=0;
|
||||
entry->value= (char*) my_realloc(entry->value, length,
|
||||
MYF(MY_ALLOW_ZERO_PTR | MY_WME |
|
||||
ME_FATALERROR |
|
||||
ME_FATAL |
|
||||
MY_THREAD_SPECIFIC));
|
||||
if (!entry->value)
|
||||
return 1;
|
||||
|
|
|
@ -5785,14 +5785,14 @@ Ordered_key::cmp_keys_by_row_data(ha_rows a, ha_rows b)
|
|||
if (unlikely((error= tbl->file->ha_rnd_pos(tbl->record[0], rowid_a))))
|
||||
{
|
||||
/* purecov: begin inspected */
|
||||
tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error
|
||||
tbl->file->print_error(error, MYF(ME_FATAL)); // Sets fatal_error
|
||||
return 0;
|
||||
/* purecov: end */
|
||||
}
|
||||
if (unlikely((error= tbl->file->ha_rnd_pos(tbl->record[1], rowid_b))))
|
||||
{
|
||||
/* purecov: begin inspected */
|
||||
tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error
|
||||
tbl->file->print_error(error, MYF(ME_FATAL)); // Sets fatal_error
|
||||
return 0;
|
||||
/* purecov: end */
|
||||
}
|
||||
|
@ -5874,7 +5874,7 @@ int Ordered_key::cmp_key_with_search_key(rownum_t row_num)
|
|||
if (unlikely((error= tbl->file->ha_rnd_pos(tbl->record[0], cur_rowid))))
|
||||
{
|
||||
/* purecov: begin inspected */
|
||||
tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error
|
||||
tbl->file->print_error(error, MYF(ME_FATAL)); // Sets fatal_error
|
||||
return 0;
|
||||
/* purecov: end */
|
||||
}
|
||||
|
|
14
sql/log.cc
14
sql/log.cc
|
@ -2789,7 +2789,7 @@ int MYSQL_LOG::generate_new_name(char *new_name, const char *log_name,
|
|||
{
|
||||
THD *thd= current_thd;
|
||||
if (unlikely(thd))
|
||||
my_error(ER_NO_UNIQUE_LOGFILE, MYF(ME_FATALERROR), log_name);
|
||||
my_error(ER_NO_UNIQUE_LOGFILE, MYF(ME_FATAL), log_name);
|
||||
sql_print_error(ER_DEFAULT(ER_NO_UNIQUE_LOGFILE), log_name);
|
||||
return 1;
|
||||
}
|
||||
|
@ -5194,7 +5194,7 @@ int MYSQL_BIN_LOG::new_file_impl(bool need_lock)
|
|||
close_on_error= TRUE;
|
||||
my_printf_error(ER_ERROR_ON_WRITE,
|
||||
ER_THD_OR_DEFAULT(current_thd, ER_CANT_OPEN_FILE),
|
||||
MYF(ME_FATALERROR), name, errno);
|
||||
MYF(ME_FATAL), name, errno);
|
||||
goto end;
|
||||
}
|
||||
bytes_written += r.data_written;
|
||||
|
@ -5263,7 +5263,7 @@ int MYSQL_BIN_LOG::new_file_impl(bool need_lock)
|
|||
/* handle reopening errors */
|
||||
if (unlikely(error))
|
||||
{
|
||||
my_error(ER_CANT_OPEN_FILE, MYF(ME_FATALERROR), file_to_open, error);
|
||||
my_error(ER_CANT_OPEN_FILE, MYF(ME_FATAL), file_to_open, error);
|
||||
close_on_error= TRUE;
|
||||
}
|
||||
|
||||
|
@ -7745,10 +7745,10 @@ MYSQL_BIN_LOG::write_transaction_to_binlog_events(group_commit_entry *entry)
|
|||
switch (entry->error)
|
||||
{
|
||||
case ER_ERROR_ON_WRITE:
|
||||
my_error(ER_ERROR_ON_WRITE, MYF(ME_NOREFRESH), name, entry->commit_errno);
|
||||
my_error(ER_ERROR_ON_WRITE, MYF(ME_ERROR_LOG), name, entry->commit_errno);
|
||||
break;
|
||||
case ER_ERROR_ON_READ:
|
||||
my_error(ER_ERROR_ON_READ, MYF(ME_NOREFRESH),
|
||||
my_error(ER_ERROR_ON_READ, MYF(ME_ERROR_LOG),
|
||||
entry->error_cache->file_name, entry->commit_errno);
|
||||
break;
|
||||
default:
|
||||
|
@ -7759,7 +7759,7 @@ MYSQL_BIN_LOG::write_transaction_to_binlog_events(group_commit_entry *entry)
|
|||
*/
|
||||
my_printf_error(entry->error,
|
||||
"Error writing transaction to binary log: %d",
|
||||
MYF(ME_NOREFRESH), entry->error);
|
||||
MYF(ME_ERROR_LOG), entry->error);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -7982,7 +7982,7 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
|
|||
when the transaction has been safely committed in the engine.
|
||||
*/
|
||||
leader->cache_mngr->delayed_error= true;
|
||||
my_error(ER_ERROR_ON_WRITE, MYF(ME_NOREFRESH), name, errno);
|
||||
my_error(ER_ERROR_ON_WRITE, MYF(ME_ERROR_LOG), name, errno);
|
||||
check_purge= false;
|
||||
}
|
||||
/* In case of binlog rotate, update the correct current binlog offset. */
|
||||
|
|
|
@ -3670,12 +3670,12 @@ void my_message_sql(uint error, const char *str, myf MyFlags)
|
|||
DBUG_ASSERT(str != NULL);
|
||||
DBUG_ASSERT(error != 0);
|
||||
|
||||
if (MyFlags & ME_JUST_INFO)
|
||||
if (MyFlags & ME_NOTE)
|
||||
{
|
||||
level= Sql_condition::WARN_LEVEL_NOTE;
|
||||
func= sql_print_information;
|
||||
}
|
||||
else if (MyFlags & ME_JUST_WARNING)
|
||||
else if (MyFlags & ME_WARNING)
|
||||
{
|
||||
level= Sql_condition::WARN_LEVEL_WARN;
|
||||
func= sql_print_warning;
|
||||
|
@ -3688,7 +3688,7 @@ void my_message_sql(uint error, const char *str, myf MyFlags)
|
|||
|
||||
if (likely(thd))
|
||||
{
|
||||
if (unlikely(MyFlags & ME_FATALERROR))
|
||||
if (unlikely(MyFlags & ME_FATAL))
|
||||
thd->is_fatal_error= 1;
|
||||
(void) thd->raise_condition(error, NULL, level, str);
|
||||
}
|
||||
|
@ -3698,7 +3698,7 @@ void my_message_sql(uint error, const char *str, myf MyFlags)
|
|||
/* When simulating OOM, skip writing to error log to avoid mtr errors */
|
||||
DBUG_EXECUTE_IF("simulate_out_of_memory", DBUG_VOID_RETURN;);
|
||||
|
||||
if (unlikely(!thd) || thd->log_all_errors || (MyFlags & ME_NOREFRESH))
|
||||
if (unlikely(!thd) || thd->log_all_errors || (MyFlags & ME_ERROR_LOG))
|
||||
(*func)("%s: %s", my_progname_short, str); /* purecov: inspected */
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
@ -9813,10 +9813,10 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
|
|||
errors.
|
||||
*/
|
||||
if (global_system_variables.log_warnings >= 10)
|
||||
my_global_flags= MY_WME | ME_JUST_INFO;
|
||||
my_global_flags= MY_WME | ME_NOTE;
|
||||
/* Log all errors not handled by thd->handle_error() to my_message_sql() */
|
||||
if (global_system_variables.log_warnings >= 11)
|
||||
my_global_flags|= ME_NOREFRESH;
|
||||
my_global_flags|= ME_ERROR_LOG;
|
||||
if (my_assert_on_error)
|
||||
debug_assert_if_crashed_table= 1;
|
||||
|
||||
|
|
|
@ -318,7 +318,7 @@ int opt_sum_query(THD *thd,
|
|||
error= tl->table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
|
||||
if (unlikely(error))
|
||||
{
|
||||
tl->table->file->print_error(error, MYF(ME_FATALERROR));
|
||||
tl->table->file->print_error(error, MYF(ME_FATAL));
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
count*= tl->table->file->stats.records;
|
||||
|
|
|
@ -1091,7 +1091,7 @@ bool Master_info_index::init_all_master_info()
|
|||
|
||||
if ((index_file_nr= my_open(index_file_name,
|
||||
O_RDWR | O_CREAT | O_BINARY ,
|
||||
MYF(MY_WME | ME_NOREFRESH))) < 0 ||
|
||||
MYF(MY_WME | ME_ERROR_LOG))) < 0 ||
|
||||
my_sync(index_file_nr, MYF(MY_WME)) ||
|
||||
init_io_cache(&index_file, index_file_nr,
|
||||
IO_SIZE, READ_CACHE,
|
||||
|
@ -1307,7 +1307,7 @@ Master_info *get_master_info(const LEX_CSTRING *connection_name,
|
|||
if (warning != Sql_condition::WARN_LEVEL_NOTE)
|
||||
my_error(WARN_NO_MASTER_INFO,
|
||||
MYF(warning == Sql_condition::WARN_LEVEL_WARN ?
|
||||
ME_JUST_WARNING : 0),
|
||||
ME_WARNING : 0),
|
||||
(int) connection_name->length, connection_name->str);
|
||||
mysql_mutex_unlock(&LOCK_active_mi);
|
||||
DBUG_RETURN(0);
|
||||
|
@ -1377,7 +1377,7 @@ Master_info_index::get_master_info(const LEX_CSTRING *connection_name,
|
|||
if (!mi && warning != Sql_condition::WARN_LEVEL_NOTE)
|
||||
{
|
||||
my_error(WARN_NO_MASTER_INFO,
|
||||
MYF(warning == Sql_condition::WARN_LEVEL_WARN ? ME_JUST_WARNING :
|
||||
MYF(warning == Sql_condition::WARN_LEVEL_WARN ? ME_WARNING :
|
||||
0),
|
||||
(int) connection_name->length,
|
||||
connection_name->str);
|
||||
|
|
|
@ -4574,7 +4574,7 @@ sp_instr_set_case_expr::exec_core(THD *thd, uint *nextp)
|
|||
thd->spcont->set_case_expr(thd, m_case_expr_id, &null_item))
|
||||
{
|
||||
/* If this also failed, we have to abort. */
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -173,7 +173,7 @@ void mysql_client_binlog_statement(THD* thd)
|
|||
*/
|
||||
if (!(rli && buf))
|
||||
{
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), 1); /* needed 1 bytes */
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), 1); /* needed 1 bytes */
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
|
|
@ -1500,7 +1500,7 @@ bool THD::set_db(const LEX_CSTRING *new_db)
|
|||
const char *tmp= NULL;
|
||||
if (new_db->str)
|
||||
{
|
||||
if (!(tmp= my_strndup(new_db->str, new_db->length, MYF(MY_WME | ME_FATALERROR))))
|
||||
if (!(tmp= my_strndup(new_db->str, new_db->length, MYF(MY_WME | ME_FATAL))))
|
||||
result= 1;
|
||||
}
|
||||
|
||||
|
@ -2659,7 +2659,7 @@ CHANGED_TABLE_LIST* THD::changed_table_dup(const char *key, size_t key_length)
|
|||
key_length + 1);
|
||||
if (!new_table)
|
||||
{
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_FATALERROR),
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_FATAL),
|
||||
ALIGN_SIZE(sizeof(TABLE_LIST)) + key_length + 1);
|
||||
set_killed(KILL_CONNECTION);
|
||||
return 0;
|
||||
|
@ -3316,7 +3316,7 @@ int select_export::send_data(List<Item> &items)
|
|||
set_if_smaller(estimated_bytes, UINT_MAX32);
|
||||
if (cvt_str.realloc((uint32) estimated_bytes))
|
||||
{
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), (uint32) estimated_bytes);
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), (uint32) estimated_bytes);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
@ -3574,7 +3574,7 @@ int select_singlerow_subselect::send_data(List<Item> &items)
|
|||
if (it->assigned())
|
||||
{
|
||||
my_message(ER_SUBQUERY_NO_1_ROW, ER_THD(thd, ER_SUBQUERY_NO_1_ROW),
|
||||
MYF(current_thd->lex->ignore ? ME_JUST_WARNING : 0));
|
||||
MYF(current_thd->lex->ignore ? ME_WARNING : 0));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
if (unit->offset_limit_cnt)
|
||||
|
|
|
@ -764,7 +764,7 @@ bool With_element::set_unparsed_spec(THD *thd, char *spec_start, char *spec_end)
|
|||
|
||||
if (!unparsed_spec.str)
|
||||
{
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR),
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATAL),
|
||||
static_cast<int>(unparsed_spec.length));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -766,7 +766,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
|||
else
|
||||
{
|
||||
table->file->print_error(error,
|
||||
MYF(thd->lex->ignore ? ME_JUST_WARNING : 0));
|
||||
MYF(thd->lex->ignore ? ME_WARNING : 0));
|
||||
if (thd->is_error())
|
||||
{
|
||||
error= 1;
|
||||
|
|
|
@ -1719,7 +1719,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
|||
*/
|
||||
if (info->ignore)
|
||||
{
|
||||
table->file->print_error(error, MYF(ME_JUST_WARNING));
|
||||
table->file->print_error(error, MYF(ME_WARNING));
|
||||
goto ok_or_after_trg_err; /* Ignoring a not fatal error, return 0 */
|
||||
}
|
||||
goto err;
|
||||
|
@ -1844,7 +1844,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
|||
{
|
||||
if (!(thd->variables.old_behavior &
|
||||
OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE))
|
||||
table->file->print_error(error, MYF(ME_JUST_WARNING));
|
||||
table->file->print_error(error, MYF(ME_WARNING));
|
||||
goto ok_or_after_trg_err;
|
||||
}
|
||||
goto err;
|
||||
|
@ -2026,7 +2026,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
|||
goto err;
|
||||
if (!(thd->variables.old_behavior &
|
||||
OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE))
|
||||
table->file->print_error(error, MYF(ME_JUST_WARNING));
|
||||
table->file->print_error(error, MYF(ME_WARNING));
|
||||
table->file->restore_auto_increment(prev_insert_id);
|
||||
goto ok_or_after_trg_err;
|
||||
}
|
||||
|
@ -2360,7 +2360,7 @@ bool delayed_get_table(THD *thd, MDL_request *grl_protection_request,
|
|||
di->thd.set_db(&table_list->db);
|
||||
di->thd.set_query(my_strndup(table_list->table_name.str,
|
||||
table_list->table_name.length,
|
||||
MYF(MY_WME | ME_FATALERROR)),
|
||||
MYF(MY_WME | ME_FATAL)),
|
||||
table_list->table_name.length, system_charset_info);
|
||||
if (di->thd.db.str == NULL || di->thd.query() == NULL)
|
||||
{
|
||||
|
@ -2392,7 +2392,7 @@ bool delayed_get_table(THD *thd, MDL_request *grl_protection_request,
|
|||
mysql_mutex_unlock(&di->mutex);
|
||||
di->unlock();
|
||||
delete di;
|
||||
my_error(ER_CANT_CREATE_THREAD, MYF(ME_FATALERROR), error);
|
||||
my_error(ER_CANT_CREATE_THREAD, MYF(ME_FATAL), error);
|
||||
goto end_create;
|
||||
}
|
||||
|
||||
|
@ -3261,7 +3261,7 @@ bool Delayed_insert::handle_inserts(void)
|
|||
or if another thread is removing the current table definition
|
||||
from the table cache.
|
||||
*/
|
||||
my_error(ER_DELAYED_CANT_CHANGE_LOCK, MYF(ME_FATALERROR | ME_NOREFRESH),
|
||||
my_error(ER_DELAYED_CANT_CHANGE_LOCK, MYF(ME_FATAL | ME_ERROR_LOG),
|
||||
table->s->table_name.str);
|
||||
goto err;
|
||||
}
|
||||
|
@ -3434,7 +3434,7 @@ bool Delayed_insert::handle_inserts(void)
|
|||
{
|
||||
/* This is not known to happen. */
|
||||
my_error(ER_DELAYED_CANT_CHANGE_LOCK,
|
||||
MYF(ME_FATALERROR | ME_NOREFRESH),
|
||||
MYF(ME_FATAL | ME_ERROR_LOG),
|
||||
table->s->table_name.str);
|
||||
goto err;
|
||||
}
|
||||
|
|
|
@ -608,7 +608,7 @@ struct ilink
|
|||
struct ilink **prev,*next;
|
||||
static void *operator new(size_t size) throw ()
|
||||
{
|
||||
return (void*)my_malloc((uint)size, MYF(MY_WME | MY_FAE | ME_FATALERROR));
|
||||
return (void*)my_malloc((uint)size, MYF(MY_WME | MY_FAE | ME_FATAL));
|
||||
}
|
||||
static void operator delete(void* ptr_arg, size_t)
|
||||
{
|
||||
|
|
|
@ -7521,7 +7521,7 @@ bool check_stack_overrun(THD *thd, long margin,
|
|||
if (ebuff) {
|
||||
my_snprintf(ebuff, MYSQL_ERRMSG_SIZE, ER_THD(thd, ER_STACK_OVERRUN_NEED_MORE),
|
||||
stack_used, my_thread_stack_size, margin);
|
||||
my_message(ER_STACK_OVERRUN_NEED_MORE, ebuff, MYF(ME_FATALERROR));
|
||||
my_message(ER_STACK_OVERRUN_NEED_MORE, ebuff, MYF(ME_FATAL));
|
||||
delete [] ebuff;
|
||||
}
|
||||
return 1;
|
||||
|
|
|
@ -2644,7 +2644,7 @@ char *generate_partition_syntax(THD *thd, partition_info *part_info,
|
|||
default:
|
||||
DBUG_ASSERT(0);
|
||||
/* We really shouldn't get here, no use in continuing from here */
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
|
||||
DBUG_RETURN(NULL);
|
||||
}
|
||||
if (part_info->part_type == VERSIONING_PARTITION)
|
||||
|
@ -5991,7 +5991,7 @@ static bool mysql_change_partitions(ALTER_PARTITION_PARAM_TYPE *lpt)
|
|||
lpt->pack_frm_data,
|
||||
lpt->pack_frm_len))))
|
||||
{
|
||||
file->print_error(error, MYF(error != ER_OUTOFMEMORY ? 0 : ME_FATALERROR));
|
||||
file->print_error(error, MYF(error != ER_OUTOFMEMORY ? 0 : ME_FATAL));
|
||||
}
|
||||
|
||||
if (mysql_trans_commit_alter_copy_data(thd))
|
||||
|
|
|
@ -1514,7 +1514,7 @@ static int mysql_test_select(Prepared_statement *stmt,
|
|||
|
||||
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send(thd)))
|
||||
{
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR),
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATAL),
|
||||
static_cast<int>(sizeof(select_send)));
|
||||
goto error;
|
||||
}
|
||||
|
@ -2085,7 +2085,7 @@ static bool mysql_test_multidelete(Prepared_statement *stmt,
|
|||
if (add_item_to_list(thd, new (thd->mem_root)
|
||||
Item_null(thd)))
|
||||
{
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), 0);
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), 0);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -4718,7 +4718,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
|||
alloc_query(thd, (char*) expanded_query->ptr(),
|
||||
expanded_query->length()))
|
||||
{
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), expanded_query->length());
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), expanded_query->length());
|
||||
goto error;
|
||||
}
|
||||
/*
|
||||
|
|
|
@ -18407,7 +18407,7 @@ create_internal_tmp_table_from_heap(THD *thd, TABLE *table,
|
|||
We don't want this error to be converted to a warning, e.g. in case of
|
||||
INSERT IGNORE ... SELECT.
|
||||
*/
|
||||
table->file->print_error(error, MYF(ME_FATALERROR));
|
||||
table->file->print_error(error, MYF(ME_FATAL));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
new_table= *table;
|
||||
|
@ -22562,7 +22562,7 @@ static int remove_dup_with_compare(THD *thd, TABLE *table, Field **first_field,
|
|||
if (unlikely(copy_blobs(first_field)))
|
||||
{
|
||||
my_message(ER_OUTOFMEMORY, ER_THD(thd,ER_OUTOFMEMORY),
|
||||
MYF(ME_FATALERROR));
|
||||
MYF(ME_FATAL));
|
||||
error=0;
|
||||
goto err;
|
||||
}
|
||||
|
@ -23469,7 +23469,7 @@ void calc_group_buffer(TMP_TABLE_PARAM *param, ORDER *group)
|
|||
default:
|
||||
/* This case should never be choosen */
|
||||
DBUG_ASSERT(0);
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
|
||||
}
|
||||
}
|
||||
parts++;
|
||||
|
|
|
@ -7329,7 +7329,7 @@ static int get_schema_partitions_record(THD *thd, TABLE_LIST *tables,
|
|||
break;
|
||||
default:
|
||||
DBUG_ASSERT(0);
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
table->field[7]->set_notnull();
|
||||
|
|
|
@ -974,7 +974,7 @@ update_begin:
|
|||
myf flags= 0;
|
||||
|
||||
if (table->file->is_fatal_error(error, HA_CHECK_ALL))
|
||||
flags|= ME_FATALERROR; /* Other handler errors are fatal */
|
||||
flags|= ME_FATAL; /* Other handler errors are fatal */
|
||||
|
||||
prepare_record_for_error_message(error, table);
|
||||
table->file->print_error(error,MYF(flags));
|
||||
|
@ -1085,7 +1085,7 @@ update_begin:
|
|||
{
|
||||
/* purecov: begin inspected */
|
||||
prepare_record_for_error_message(loc_error, table);
|
||||
table->file->print_error(loc_error,MYF(ME_FATALERROR));
|
||||
table->file->print_error(loc_error,MYF(ME_FATAL));
|
||||
error= 1;
|
||||
/* purecov: end */
|
||||
}
|
||||
|
@ -2381,7 +2381,7 @@ int multi_update::send_data(List<Item> ¬_used_values)
|
|||
myf flags= 0;
|
||||
|
||||
if (table->file->is_fatal_error(error, HA_CHECK_ALL))
|
||||
flags|= ME_FATALERROR; /* Other handler errors are fatal */
|
||||
flags|= ME_FATAL; /* Other handler errors are fatal */
|
||||
|
||||
prepare_record_for_error_message(error, table);
|
||||
table->file->print_error(error,MYF(flags));
|
||||
|
@ -2756,7 +2756,7 @@ int multi_update::do_updates()
|
|||
err:
|
||||
{
|
||||
prepare_record_for_error_message(local_error, err_table);
|
||||
err_table->file->print_error(local_error,MYF(ME_FATALERROR));
|
||||
err_table->file->print_error(local_error,MYF(ME_FATAL));
|
||||
}
|
||||
|
||||
err2:
|
||||
|
|
|
@ -3018,7 +3018,7 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE *table,
|
|||
of the statement because the field item does not have a field
|
||||
pointer at that time
|
||||
*/
|
||||
myf warn= table->s->frm_version < FRM_VER_EXPRESSSIONS ? ME_JUST_WARNING : 0;
|
||||
myf warn= table->s->frm_version < FRM_VER_EXPRESSSIONS ? ME_WARNING : 0;
|
||||
my_error(ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(warn),
|
||||
"AUTO_INCREMENT", vcol->get_vcol_type_name(), res.name);
|
||||
if (!warn)
|
||||
|
@ -5255,7 +5255,7 @@ int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure)
|
|||
main_view->db.str);
|
||||
const char *name_table= (main_view->view ? main_view->view_name.str :
|
||||
main_view->table_name.str);
|
||||
my_error(ER_VIEW_CHECK_FAILED, MYF(ignore_failure ? ME_JUST_WARNING : 0),
|
||||
my_error(ER_VIEW_CHECK_FAILED, MYF(ignore_failure ? ME_WARNING : 0),
|
||||
name_db, name_table);
|
||||
return ignore_failure ? VIEW_CHECK_SKIP : VIEW_CHECK_ERROR;
|
||||
}
|
||||
|
@ -5287,7 +5287,7 @@ int TABLE::verify_constraints(bool ignore_failure)
|
|||
in_use->is_error())
|
||||
{
|
||||
my_error(ER_CONSTRAINT_FAILED,
|
||||
MYF(ignore_failure ? ME_JUST_WARNING : 0), (*chk)->name.str,
|
||||
MYF(ignore_failure ? ME_WARNING : 0), (*chk)->name.str,
|
||||
s->db.str, s->table_name.str);
|
||||
return ignore_failure ? VIEW_CHECK_SKIP : VIEW_CHECK_ERROR;
|
||||
}
|
||||
|
|
|
@ -56,11 +56,6 @@
|
|||
#endif
|
||||
#define ER_THD_OR_DEFAULT(thd,X) ((thd) ? ER_THD(thd, (X)) : ER_DEFAULT(X))
|
||||
|
||||
|
||||
#define ME_INFO (ME_HOLDTANG | ME_NOREFRESH)
|
||||
#define ME_ERROR (ME_BELL | ME_NOREFRESH)
|
||||
#define MYF_RW MYF(MY_WME+MY_NABP) /* Vid my_read & my_write */
|
||||
|
||||
#define SPECIAL_USE_LOCKS 1 /* Lock used databases */
|
||||
#define SPECIAL_NO_NEW_FUNC 2 /* Skip new functions */
|
||||
#define SPECIAL_SKIP_SHOW_DB 4 /* Don't allow 'show db' */
|
||||
|
|
|
@ -802,7 +802,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
|
|||
#endif /* HAVE_READLINK */
|
||||
{
|
||||
if (create_info->data_file_name)
|
||||
my_error(WARN_OPTION_IGNORED, MYF(ME_JUST_WARNING), "DATA DIRECTORY");
|
||||
my_error(WARN_OPTION_IGNORED, MYF(ME_WARNING), "DATA DIRECTORY");
|
||||
|
||||
fn_format(name_buff, name, "", ARZ,
|
||||
MY_REPLACE_EXT | MY_UNPACK_FILENAME);
|
||||
|
@ -811,7 +811,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
|
|||
|
||||
/* Archive engine never uses INDEX DIRECTORY. */
|
||||
if (create_info->index_file_name)
|
||||
my_error(WARN_OPTION_IGNORED, MYF(ME_JUST_WARNING), "INDEX DIRECTORY");
|
||||
my_error(WARN_OPTION_IGNORED, MYF(ME_WARNING), "INDEX DIRECTORY");
|
||||
|
||||
/*
|
||||
There is a chance that the file was "discovered". In this case
|
||||
|
|
|
@ -1385,7 +1385,7 @@ int ha_tina::rnd_end()
|
|||
if (mysql_file_write(update_temp_file,
|
||||
(uchar*) (file_buff->ptr() +
|
||||
(write_begin - file_buff->start())),
|
||||
(size_t)write_length, MYF_RW))
|
||||
(size_t)write_length, MYF(MY_WME+MY_NABP)))
|
||||
goto error;
|
||||
temp_file_length+= write_length;
|
||||
}
|
||||
|
@ -1571,7 +1571,7 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt)
|
|||
write_end= MY_MIN(file_buff->end(), current_position);
|
||||
if ((write_end - write_begin) &&
|
||||
(mysql_file_write(repair_file, (uchar*)file_buff->ptr(),
|
||||
(size_t) (write_end - write_begin), MYF_RW)))
|
||||
(size_t) (write_end - write_begin), MYF(MY_WME+MY_NABP))))
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
write_begin= write_end;
|
||||
|
|
|
@ -11828,7 +11828,7 @@ create_table_info_t::parse_table_name(
|
|||
}
|
||||
|
||||
if (m_create_info->index_file_name) {
|
||||
my_error(WARN_OPTION_IGNORED, ME_JUST_WARNING,
|
||||
my_error(WARN_OPTION_IGNORED, ME_WARNING,
|
||||
"INDEX DIRECTORY");
|
||||
}
|
||||
|
||||
|
@ -20948,10 +20948,10 @@ ib_senderrf(
|
|||
|
||||
switch (level) {
|
||||
case IB_LOG_LEVEL_INFO:
|
||||
l = ME_JUST_INFO;
|
||||
l = ME_NOTE;
|
||||
break;
|
||||
case IB_LOG_LEVEL_WARN:
|
||||
l = ME_JUST_WARNING;
|
||||
l = ME_WARNING;
|
||||
break;
|
||||
case IB_LOG_LEVEL_ERROR:
|
||||
sd_notifyf(0, "STATUS=InnoDB: Error: %s", str);
|
||||
|
|
|
@ -3506,7 +3506,7 @@ static int mark_recovery_start(const char* log_dir)
|
|||
int res;
|
||||
DBUG_ENTER("mark_recovery_start");
|
||||
if (!(maria_recover_options & HA_RECOVER_ANY))
|
||||
ma_message_no_user(ME_JUST_WARNING, "Please consider using option"
|
||||
ma_message_no_user(ME_WARNING, "Please consider using option"
|
||||
" --aria-recover-options[=...] to automatically check and"
|
||||
" repair tables when logs are removed by option"
|
||||
" --aria-force-start-after-recovery-failures=#");
|
||||
|
@ -3524,7 +3524,7 @@ static int mark_recovery_start(const char* log_dir)
|
|||
" recovery from logs",
|
||||
(res ? "failed to remove some" : "removed all"),
|
||||
recovery_failures);
|
||||
ma_message_no_user((res ? 0 : ME_JUST_WARNING), msg);
|
||||
ma_message_no_user((res ? 0 : ME_WARNING), msg);
|
||||
}
|
||||
else
|
||||
res= ma_control_file_write_and_force(last_checkpoint_lsn, last_logno,
|
||||
|
|
|
@ -84,8 +84,8 @@ static inline LSN lsn_read_non_atomic_32(const volatile LSN *x)
|
|||
prints a message from a task not connected to any user (checkpoint
|
||||
and recovery for example).
|
||||
|
||||
@param level 0 if error, ME_JUST_WARNING if warning,
|
||||
ME_JUST_INFO if info
|
||||
@param level 0 if error, ME_WARNING if warning,
|
||||
ME_NOTE if info
|
||||
@param sentence text to write
|
||||
*/
|
||||
#define ma_message_no_user(level, sentence) \
|
||||
|
|
|
@ -531,7 +531,7 @@ int ma_control_file_write_and_force(LSN last_checkpoint_lsn_arg,
|
|||
"Control file must be from a newer version; zero-ing out %u"
|
||||
" unknown bytes in control file at offset %u", zeroed,
|
||||
cf_changeable_size + cf_create_time_size);
|
||||
ma_message_no_user(ME_JUST_WARNING, msg);
|
||||
ma_message_no_user(ME_WARNING, msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -156,7 +156,7 @@ ma_crypt_read(MARIA_SHARE* share, uchar *buff)
|
|||
{
|
||||
my_printf_error(HA_ERR_UNSUPPORTED,
|
||||
"Unsupported crypt scheme! type: %d iv_length: %d\n",
|
||||
MYF(ME_FATALERROR|ME_NOREFRESH),
|
||||
MYF(ME_FATAL|ME_ERROR_LOG),
|
||||
type, iv_length);
|
||||
return 0;
|
||||
}
|
||||
|
@ -464,7 +464,7 @@ static int ma_encrypt(MARIA_SHARE *share, MARIA_CRYPT_DATA *crypt_data,
|
|||
my_errno= HA_ERR_DECRYPTION_FAILED;
|
||||
my_printf_error(HA_ERR_DECRYPTION_FAILED,
|
||||
"Unknown key id %u. Can't continue!",
|
||||
MYF(ME_FATALERROR|ME_NOREFRESH),
|
||||
MYF(ME_FATAL|ME_ERROR_LOG),
|
||||
crypt_data->scheme.key_id);
|
||||
return 1;
|
||||
}
|
||||
|
@ -481,7 +481,7 @@ static int ma_encrypt(MARIA_SHARE *share, MARIA_CRYPT_DATA *crypt_data,
|
|||
my_errno= HA_ERR_DECRYPTION_FAILED;
|
||||
my_printf_error(HA_ERR_DECRYPTION_FAILED,
|
||||
"failed to encrypt '%s' rc: %d dstlen: %u size: %u\n",
|
||||
MYF(ME_FATALERROR|ME_NOREFRESH),
|
||||
MYF(ME_FATAL|ME_ERROR_LOG),
|
||||
share->open_file_name.str, rc, dstlen, size);
|
||||
return 1;
|
||||
}
|
||||
|
@ -508,7 +508,7 @@ static int ma_decrypt(MARIA_SHARE *share, MARIA_CRYPT_DATA *crypt_data,
|
|||
my_errno= HA_ERR_DECRYPTION_FAILED;
|
||||
my_printf_error(HA_ERR_DECRYPTION_FAILED,
|
||||
"failed to decrypt '%s' rc: %d dstlen: %u size: %u\n",
|
||||
MYF(ME_FATALERROR|ME_NOREFRESH),
|
||||
MYF(ME_FATAL|ME_ERROR_LOG),
|
||||
share->open_file_name.str, rc, dstlen, size);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -144,6 +144,6 @@ void _ma_report_error(int errcode, const LEX_STRING *name)
|
|||
}
|
||||
}
|
||||
|
||||
my_error(errcode, MYF(ME_NOREFRESH), file_name);
|
||||
my_error(errcode, MYF(ME_ERROR_LOG), file_name);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ my_bool maria_upgrade()
|
|||
my_message(HA_ERR_INITIALIZATION,
|
||||
"Found old style Maria log files; "
|
||||
"Converting them to Aria names",
|
||||
MYF(ME_JUST_INFO));
|
||||
MYF(ME_NOTE));
|
||||
|
||||
for (i= 0; i < dir->number_of_files; i++)
|
||||
{
|
||||
|
|
|
@ -184,7 +184,7 @@ void maria_recover_error_handler_hook(uint error, const char *str,
|
|||
|
||||
static void print_preamble()
|
||||
{
|
||||
ma_message_no_user(ME_JUST_INFO, "starting recovery");
|
||||
ma_message_no_user(ME_NOTE, "starting recovery");
|
||||
}
|
||||
|
||||
|
||||
|
@ -516,7 +516,7 @@ end:
|
|||
}
|
||||
if (!error)
|
||||
{
|
||||
ma_message_no_user(ME_JUST_INFO, "recovery done");
|
||||
ma_message_no_user(ME_NOTE, "recovery done");
|
||||
maria_recovery_changed_data= 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,13 +30,11 @@
|
|||
/* static variables */
|
||||
|
||||
#undef MIN_SORT_MEMORY
|
||||
#undef MYF_RW
|
||||
#undef DISK_BUFFER_SIZE
|
||||
|
||||
#define MERGEBUFF 15
|
||||
#define MERGEBUFF2 31
|
||||
#define MIN_SORT_MEMORY (4096-MALLOC_OVERHEAD)
|
||||
#define MYF_RW MYF(MY_NABP | MY_WME | MY_WAIT_IF_FULL)
|
||||
#define DISK_BUFFER_SIZE (IO_SIZE*128)
|
||||
|
||||
/* How many keys we can keep in memory */
|
||||
|
|
|
@ -1807,7 +1807,7 @@ bool ha_myisam::check_and_repair(THD *thd)
|
|||
sql_print_information("Making backup of index file %s with extension '%s'",
|
||||
file->s->index_file_name, buff);
|
||||
mi_make_backup_of_index(file, check_opt.start_time,
|
||||
MYF(MY_WME | ME_JUST_WARNING));
|
||||
MYF(MY_WME | ME_WARNING));
|
||||
}
|
||||
check_opt.flags=
|
||||
(((myisam_recover_options &
|
||||
|
|
|
@ -4776,7 +4776,7 @@ static int replace_data_file(HA_CHECK *param, MI_INFO *info, File new_file)
|
|||
my_create_backup_name(buff, "", param->backup_time);
|
||||
my_printf_error(ER_GET_ERRMSG,
|
||||
"Making backup of data file %s with extension '%s'",
|
||||
MYF(ME_JUST_INFO | ME_NOREFRESH), share->data_file_name,
|
||||
MYF(ME_NOTE | ME_ERROR_LOG), share->data_file_name,
|
||||
buff);
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ void mi_report_error(int errcode, const char *file_name)
|
|||
|
||||
if ((lgt= strlen(file_name)) > 64)
|
||||
file_name+= lgt - 64;
|
||||
my_error(errcode, MYF(ME_NOREFRESH), file_name);
|
||||
my_error(errcode, MYF(ME_ERROR_LOG), file_name);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
|
|
@ -2148,7 +2148,7 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
|
|||
*/
|
||||
if (!(packed_tree=(uint*) my_alloca(sizeof(uint)*length*2)))
|
||||
{
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATALERROR),
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL),
|
||||
sizeof(uint)*length*2);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -28,12 +28,10 @@
|
|||
|
||||
/* static variables */
|
||||
|
||||
#undef MYF_RW
|
||||
#undef DISK_BUFFER_SIZE
|
||||
|
||||
#define MERGEBUFF 15
|
||||
#define MERGEBUFF2 31
|
||||
#define MYF_RW MYF(MY_NABP | MY_WME | MY_WAIT_IF_FULL)
|
||||
#define DISK_BUFFER_SIZE (IO_SIZE*128)
|
||||
|
||||
/* How many keys we can keep in memory */
|
||||
|
|
|
@ -6783,7 +6783,7 @@ int ha_rocksdb::create_cfs(
|
|||
tbl_def_arg->full_tablename().c_str(),
|
||||
table_arg->key_info[i].key_part[part].field->field_name.str);
|
||||
|
||||
my_error(ER_INTERNAL_ERROR, MYF(ME_JUST_WARNING), buf);
|
||||
my_error(ER_INTERNAL_ERROR, MYF(ME_WARNING), buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7316,14 +7316,14 @@ int ha_rocksdb::create(const char *const name, TABLE *const table_arg,
|
|||
// The `rocksdb_datadir` setting should be used to configure RocksDB data
|
||||
// directory.
|
||||
print_error(HA_ERR_ROCKSDB_TABLE_DATA_DIRECTORY_NOT_SUPPORTED,
|
||||
MYF(ME_JUST_WARNING));
|
||||
MYF(ME_WARNING));
|
||||
DBUG_RETURN(HA_WRONG_CREATE_OPTION);
|
||||
}
|
||||
|
||||
if (create_info->index_file_name) {
|
||||
// Similar check for INDEX DIRECTORY as well.
|
||||
print_error(HA_ERR_ROCKSDB_TABLE_INDEX_DIRECTORY_NOT_SUPPORTED,
|
||||
MYF(ME_JUST_WARNING));
|
||||
MYF(ME_WARNING));
|
||||
DBUG_RETURN(HA_WRONG_CREATE_OPTION);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue