mysys: rename ME_xxx flags to match plugin api

This commit is contained in:
Sergei Golubchik 2018-05-29 23:54:25 +02:00
parent 37659ef43b
commit c9061d1102
56 changed files with 138 additions and 146 deletions

View File

@ -104,11 +104,11 @@ typedef struct my_aio_result {
#define MY_GIVE_INFO 2U /* Give time info about process*/ #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 MY_DONT_FREE_DBUG 4U /* Do not call DBUG_END() in my_end() */
#define ME_BELL 4U /* Ring bell then printing message */ #define ME_BELL 4U /* Ring bell then printing message */
#define ME_NOREFRESH 64U /* Write the error message to error log */ #define ME_ERROR_LOG 64 /**< write the error message to error log */
#define ME_JUST_INFO 1024U /**< not error but just info */ #define ME_NOTE 1024 /**< not error but just info */
#define ME_JUST_WARNING 2048U /**< not error but just warning */ #define ME_WARNING 2048 /**< not error but just warning */
#define ME_FATALERROR 4096U /* Fatal statement error */ #define ME_FATAL 4096 /**< fatal statement error */
/* Bits in last argument to fn_format */ /* Bits in last argument to fn_format */
#define MY_REPLACE_DIR 1U /* replace dir in name with 'dir' */ #define MY_REPLACE_DIR 1U /* replace dir in name with 'dir' */

View File

@ -107,12 +107,12 @@ void init_glob_errs()
void wait_for_free_space(const char *filename, int errors) void wait_for_free_space(const char *filename, int errors)
{ {
if (errors == 0) 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); filename,my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
if (!(errors % MY_WAIT_GIVE_USER_A_MESSAGE)) if (!(errors % MY_WAIT_GIVE_USER_A_MESSAGE))
my_printf_error(EE_DISK_FULL, my_printf_error(EE_DISK_FULL,
"Retry in %d secs. Message reprinted in %d secs", "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_FOR_USER_TO_FIX_PANIC,
MY_WAIT_GIVE_USER_A_MESSAGE * 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); (void) sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC);

View File

@ -576,7 +576,7 @@ int init_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache,
if (blocks < 8) if (blocks < 8)
{ {
my_errno= ENOMEM; my_errno= ENOMEM;
my_error(EE_OUTOFMEMORY, MYF(ME_FATALERROR), my_error(EE_OUTOFMEMORY, MYF(ME_FATAL),
blocks * keycache->key_cache_block_size); blocks * keycache->key_cache_block_size);
goto err; goto err;
} }

View File

@ -192,7 +192,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
length+=ALIGN_SIZE(sizeof(USED_MEM)); length+=ALIGN_SIZE(sizeof(USED_MEM));
if (!(next = (USED_MEM*) my_malloc(length, if (!(next = (USED_MEM*) my_malloc(length,
MYF(MY_WME | ME_FATALERROR | MYF(MY_WME | ME_FATAL |
MALLOC_FLAG(mem_root->block_size))))) MALLOC_FLAG(mem_root->block_size)))))
{ {
if (mem_root->error_handler) 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); get_size= MY_MAX(get_size, block_size);
if (!(next = (USED_MEM*) my_malloc(get_size, if (!(next = (USED_MEM*) my_malloc(get_size,
MYF(MY_WME | ME_FATALERROR | MYF(MY_WME | ME_FATAL |
MALLOC_FLAG(mem_root-> MALLOC_FLAG(mem_root->
block_size))))) block_size)))))
{ {

View File

@ -43,7 +43,7 @@ uchar *my_malloc_lock(uint size,myf MyFlags)
if (!(ptr=memalign(pagesize,size))) if (!(ptr=memalign(pagesize,size)))
{ {
if (MyFlags & (MY_FAE+MY_WME)) 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); DBUG_RETURN(0);
} }
success = mlock((uchar*) ptr,size); success = mlock((uchar*) ptr,size);

View File

@ -106,7 +106,7 @@ void *my_malloc(size_t size, myf my_flags)
if (my_flags & MY_FAE) if (my_flags & MY_FAE)
error_handler_hook=fatal_error_handler_hook; error_handler_hook=fatal_error_handler_hook;
if (my_flags & (MY_FAE+MY_WME)) 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) if (my_flags & MY_FAE)
abort(); abort();
} }
@ -174,7 +174,7 @@ void *my_realloc(void *oldpoint, size_t size, myf my_flags)
DBUG_RETURN(oldpoint); DBUG_RETURN(oldpoint);
my_errno=errno; my_errno=errno;
if (my_flags & (MY_FAE+MY_WME)) 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 else
{ {

View File

@ -59,7 +59,7 @@ void* my_once_alloc(size_t Size, myf MyFlags)
{ {
my_errno=errno; my_errno=errno;
if (MyFlags & (MY_FAE+MY_WME)) 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); return((uchar*) 0);
} }
DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size)); DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size));

View File

@ -101,7 +101,7 @@ int my_close(File fd, myf MyFlags)
DBUG_PRINT("error",("Got error %d on close",err)); DBUG_PRINT("error",("Got error %d on close",err));
my_errno=errno; my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME)) 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); name,errno);
} }
if (name) if (name)
@ -156,7 +156,7 @@ File my_register_filename(File fd, const char *FileName, enum file_type
if (my_errno == EMFILE) if (my_errno == EMFILE)
error_message_number= EE_OUT_OF_FILERESOURCES; error_message_number= EE_OUT_OF_FILERESOURCES;
my_error(error_message_number, 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); FileName, my_errno);
} }
DBUG_RETURN(-1); DBUG_RETURN(-1);

View File

@ -86,11 +86,11 @@ size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset,
{ {
if (readbytes == (size_t) -1) if (readbytes == (size_t) -1)
my_error(EE_READ, 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); my_filename(Filedes),my_errno);
else if (MyFlags & (MY_NABP | MY_FNABP)) else if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR, 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); my_filename(Filedes),my_errno);
} }
if (readbytes == (size_t) -1 || (MyFlags & (MY_FNABP | MY_NABP))) 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_NABP | MY_FNABP))
{ {
if (MyFlags & (MY_WME | MY_FAE | 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); my_filename(Filedes),my_errno);
DBUG_RETURN(MY_FILE_ERROR); /* Error on write */ DBUG_RETURN(MY_FILE_ERROR); /* Error on write */
} }

View File

@ -90,11 +90,11 @@ size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags)
{ {
if (readbytes == (size_t) -1) if (readbytes == (size_t) -1)
my_error(EE_READ, 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); my_filename(Filedes), got_errno);
else if (MyFlags & (MY_NABP | MY_FNABP)) else if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR, 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); my_filename(Filedes), got_errno);
} }
if (readbytes == (size_t) -1 || if (readbytes == (size_t) -1 ||

View File

@ -27,7 +27,7 @@ struct passwd *my_check_user(const char *user, myf MyFlags)
my_errno= EPERM; my_errno= EPERM;
if (MyFlags & MY_WME) if (MyFlags & MY_WME)
my_printf_error(my_errno, "One can only use the --user switch if " 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); DBUG_RETURN(NULL);
@ -38,7 +38,7 @@ struct passwd *my_check_user(const char *user, myf MyFlags)
{ {
my_errno= EINVAL; my_errno= EINVAL;
my_printf_error(my_errno, "Please consult the Knowledge Base to find " 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); DBUG_RETURN(NULL);
} }
@ -54,7 +54,7 @@ struct passwd *my_check_user(const char *user, myf MyFlags)
{ {
my_errno= EINVAL; my_errno= EINVAL;
my_printf_error(my_errno, "Can't change to run as user '%s'. Please " 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); DBUG_RETURN(NULL);
} }
} }
@ -74,7 +74,7 @@ int my_set_user(const char *user, struct passwd *user_info, myf MyFlags)
{ {
my_errno= errno; my_errno= errno;
if (MyFlags & MY_WME) 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); errno);
DBUG_RETURN(my_errno); DBUG_RETURN(my_errno);
} }

View File

@ -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)) 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); my_filename(Filedes),my_errno);
} }
DBUG_RETURN(MY_FILE_ERROR); /* Error on read */ DBUG_RETURN(MY_FILE_ERROR); /* Error on read */

View File

@ -549,13 +549,13 @@ static int rotate_single_key(uint key_id)
if (!ver) 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; return -1;
} }
else if (generate_and_save_datakey(key_id, ver + 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", 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; return -1;
} }
else else
@ -566,7 +566,7 @@ static int rotate_single_key(uint key_id)
if (load_key(&info)) if (load_key(&info))
{ {
my_printf_error(ER_UNKNOWN_ERROR, "Could not load datakey for key id= %u, ver= %u", 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; 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]) if (!master_key_id[0])
{ {
my_printf_error(ER_UNKNOWN_ERROR, 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; return;
} }
mtx.lock(); mtx.lock();

View File

@ -733,7 +733,7 @@ static int user_coll_fill(struct user_coll *c, char *users,
internal_stop_logging= 1; internal_stop_logging= 1;
CLIENT_ERROR(1, "User '%.*s' was removed from the" CLIENT_ERROR(1, "User '%.*s' was removed from the"
" server_audit_excl_users.", " server_audit_excl_users.",
MYF(ME_JUST_WARNING), (int) cmp_length, users); MYF(ME_WARNING), (int) cmp_length, users);
internal_stop_logging= 0; internal_stop_logging= 0;
blank_user(cmp_user); blank_user(cmp_user);
refill_cmp_coll= 1; refill_cmp_coll= 1;
@ -742,7 +742,7 @@ static int user_coll_fill(struct user_coll *c, char *users,
{ {
internal_stop_logging= 1; internal_stop_logging= 1;
CLIENT_ERROR(1, "User '%.*s' is in the server_audit_incl_users, " 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; internal_stop_logging= 0;
remove_user(users); remove_user(users);
continue; continue;
@ -1050,7 +1050,7 @@ static int start_logging()
"Could not create file '%s'.", alt_fname); "Could not create file '%s'.", alt_fname);
is_active= 0; is_active= 0;
CLIENT_ERROR(1, "SERVER AUDIT plugin can't create file '%s'.", CLIENT_ERROR(1, "SERVER AUDIT plugin can't create file '%s'.",
MYF(ME_JUST_WARNING), alt_fname); MYF(ME_WARNING), alt_fname);
return 1; return 1;
} }
error_header(); error_header();
@ -2593,7 +2593,7 @@ static void update_file_path(MYSQL_THD thd,
{ {
error_header(); error_header();
fprintf(stderr, "Logging was disabled..\n"); 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; goto exit_func;
} }
@ -2763,7 +2763,7 @@ static void update_logging(MYSQL_THD thd,
start_logging(); start_logging();
if (!logging) if (!logging)
{ {
CLIENT_ERROR(1, "Logging was disabled.", MYF(ME_JUST_WARNING)); CLIENT_ERROR(1, "Logging was disabled.", MYF(ME_WARNING));
} }
} }
else else

View File

@ -401,7 +401,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data)
my_message_sql(ER_STARTUP, my_message_sql(ER_STARTUP,
"Event Error: An error occurred while creating query " "Event Error: An error occurred while creating query "
"string, before writing it into binary log.", "string, before writing it into binary log.",
MYF(ME_NOREFRESH)); MYF(ME_ERROR_LOG));
ret= true; ret= true;
} }
else else
@ -926,7 +926,7 @@ Events::init(THD *thd, bool opt_noacl_or_bootstrap)
my_message(ER_STARTUP, my_message(ER_STARTUP,
"Event Scheduler: An error occurred when initializing " "Event Scheduler: An error occurred when initializing "
"system tables. Disabling the Event Scheduler.", "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 */ /* Disable the scheduler since the system tables are not up to date */
opt_event_scheduler= EVENTS_OFF; opt_event_scheduler= EVENTS_OFF;
goto end; goto end;
@ -948,7 +948,7 @@ Events::init(THD *thd, bool opt_noacl_or_bootstrap)
{ {
my_message_sql(ER_STARTUP, my_message_sql(ER_STARTUP,
"Event Scheduler: Error while loading from mysql.event table.", "Event Scheduler: Error while loading from mysql.event table.",
MYF(ME_NOREFRESH)); MYF(ME_ERROR_LOG));
res= TRUE; /* fatal error: request unireg_abort */ res= TRUE; /* fatal error: request unireg_abort */
goto end; goto end;
} }
@ -1165,7 +1165,7 @@ Events::load_events_from_db(THD *thd)
{ {
my_message_sql(ER_STARTUP, my_message_sql(ER_STARTUP,
"Event Scheduler: Failed to open table mysql.event", "Event Scheduler: Failed to open table mysql.event",
MYF(ME_NOREFRESH)); MYF(ME_ERROR_LOG));
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
} }
@ -1191,7 +1191,7 @@ Events::load_events_from_db(THD *thd)
"Event Scheduler: " "Event Scheduler: "
"Error while loading events from mysql.event. " "Error while loading events from mysql.event. "
"The table probably contains bad data or is corrupted", "The table probably contains bad data or is corrupted",
MYF(ME_NOREFRESH)); MYF(ME_ERROR_LOG));
delete et; delete et;
goto end; goto end;
} }
@ -1230,9 +1230,9 @@ Events::load_events_from_db(THD *thd)
} }
my_printf_error(ER_STARTUP, my_printf_error(ER_STARTUP,
"Event Scheduler: Loaded %d event%s", "Event Scheduler: Loaded %d event%s",
MYF(ME_NOREFRESH | MYF(ME_ERROR_LOG |
(global_system_variables.log_warnings) ? (global_system_variables.log_warnings) ?
ME_JUST_INFO: 0), ME_NOTE: 0),
count, (count == 1) ? "" : "s"); count, (count == 1) ? "" : "s");
ret= FALSE; ret= FALSE;

View File

@ -258,7 +258,7 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
} }
if (memory_available < min_sort_memory) 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; goto err;
} }
tracker->report_sort_buffer_size(sort->sort_buffer_size()); 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)); DBUG_PRINT("test",("error: %d indexpos: %d",error,indexpos));
if (unlikely(error != HA_ERR_END_OF_FILE)) 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); DBUG_RETURN(HA_POS_ERROR);
} }
if (indexpos && idx && if (indexpos && idx &&

View File

@ -6808,7 +6808,7 @@ FT_INFO *ha_partition::ft_init_ext(uint flags, uint inx, String *key)
sizeof(FT_INFO *) * m_tot_parts, sizeof(FT_INFO *) * m_tot_parts,
NullS))) NullS)))
{ {
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR)); my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
DBUG_RETURN(NULL); DBUG_RETURN(NULL);
} }
ft_target->part_ft_info= tmp_ft_info; ft_target->part_ft_info= tmp_ft_info;

View File

@ -295,7 +295,7 @@ handler *get_ha_partition(partition_info *part_info)
} }
else else
{ {
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), my_error(ER_OUTOFMEMORY, MYF(ME_FATAL),
static_cast<int>(sizeof(ha_partition))); static_cast<int>(sizeof(ha_partition)));
} }
DBUG_RETURN(((handler*) 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_share.table_name= *alias;
dummy_table.alias.set(alias->str, alias->length, table_alias_charset); dummy_table.alias.set(alias->str, alias->length, table_alias_charset);
file->change_table_ptr(&dummy_table, &dummy_share); 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) if (intercept)
error= 0; error= 0;
@ -3561,7 +3561,7 @@ void handler::print_error(int error, myf errflag)
if (ha_thd()->transaction_rollback_request) if (ha_thd()->transaction_rollback_request)
{ {
/* Ensure this becomes a true error */ /* Ensure this becomes a true error */
errflag&= ~(ME_JUST_WARNING | ME_JUST_INFO); errflag&= ~(ME_WARNING | ME_NOTE);
} }
int textno= -1; // impossible value int textno= -1; // impossible value
@ -3696,14 +3696,14 @@ void handler::print_error(int error, myf errflag)
{ {
textno=ER_RECORD_FILE_FULL; textno=ER_RECORD_FILE_FULL;
/* Write the error message to error log */ /* Write the error message to error log */
errflag|= ME_NOREFRESH; errflag|= ME_ERROR_LOG;
break; break;
} }
case HA_ERR_INDEX_FILE_FULL: case HA_ERR_INDEX_FILE_FULL:
{ {
textno=ER_INDEX_FILE_FULL; textno=ER_INDEX_FILE_FULL;
/* Write the error message to error log */ /* Write the error message to error log */
errflag|= ME_NOREFRESH; errflag|= ME_ERROR_LOG;
break; break;
} }
case HA_ERR_LOCK_WAIT_TIMEOUT: case HA_ERR_LOCK_WAIT_TIMEOUT:
@ -3830,14 +3830,14 @@ void handler::print_error(int error, myf errflag)
if (unlikely(fatal_error)) if (unlikely(fatal_error))
{ {
/* Ensure this becomes a true 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 || if ((debug_assert_if_crashed_table ||
global_system_variables.log_warnings > 1)) global_system_variables.log_warnings > 1))
{ {
/* /*
Log error to log before we crash or if extended warnings are requested 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); 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; goto err;
table->s->mysql_version= MYSQL_VERSION_ID; table->s->mysql_version= MYSQL_VERSION_ID;
@ -4929,7 +4930,7 @@ int ha_create_table(THD *thd, const char *path,
{ {
if (!thd->is_error()) if (!thd->is_error())
my_error(ER_CANT_CREATE_TABLE, MYF(0), db, table_name, 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, PSI_CALL_drop_table_share(temp_table, share.db.str, (uint)share.db.length,
share.table_name.str, (uint)share.table_name.length); share.table_name.str, (uint)share.table_name.length);
} }

View File

@ -3726,7 +3726,7 @@ longlong Item_master_pos_wait::val_int()
connection_name.length= con->length(); connection_name.length= con->length();
if (check_master_connection_name(&connection_name)) 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"); "MASTER_CONNECTION_NAME");
goto err; goto err;
} }
@ -4437,7 +4437,7 @@ user_var_entry *get_variable(HASH *hash, LEX_CSTRING *name,
if (!my_hash_inited(hash)) if (!my_hash_inited(hash))
return 0; return 0;
if (!(entry = (user_var_entry*) my_malloc(size, if (!(entry = (user_var_entry*) my_malloc(size,
MYF(MY_WME | ME_FATALERROR | MYF(MY_WME | ME_FATAL |
MY_THREAD_SPECIFIC)))) MY_THREAD_SPECIFIC))))
return 0; return 0;
entry->name.str=(char*) entry+ ALIGN_SIZE(sizeof(user_var_entry))+ 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=0;
entry->value= (char*) my_realloc(entry->value, length, entry->value= (char*) my_realloc(entry->value, length,
MYF(MY_ALLOW_ZERO_PTR | MY_WME | MYF(MY_ALLOW_ZERO_PTR | MY_WME |
ME_FATALERROR | ME_FATAL |
MY_THREAD_SPECIFIC)); MY_THREAD_SPECIFIC));
if (!entry->value) if (!entry->value)
return 1; return 1;

View File

@ -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)))) if (unlikely((error= tbl->file->ha_rnd_pos(tbl->record[0], rowid_a))))
{ {
/* purecov: begin inspected */ /* 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; return 0;
/* purecov: end */ /* purecov: end */
} }
if (unlikely((error= tbl->file->ha_rnd_pos(tbl->record[1], rowid_b)))) if (unlikely((error= tbl->file->ha_rnd_pos(tbl->record[1], rowid_b))))
{ {
/* purecov: begin inspected */ /* 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; return 0;
/* purecov: end */ /* 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)))) if (unlikely((error= tbl->file->ha_rnd_pos(tbl->record[0], cur_rowid))))
{ {
/* purecov: begin inspected */ /* 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; return 0;
/* purecov: end */ /* purecov: end */
} }

View File

@ -2789,7 +2789,7 @@ int MYSQL_LOG::generate_new_name(char *new_name, const char *log_name,
{ {
THD *thd= current_thd; THD *thd= current_thd;
if (unlikely(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); sql_print_error(ER_DEFAULT(ER_NO_UNIQUE_LOGFILE), log_name);
return 1; return 1;
} }
@ -5194,7 +5194,7 @@ int MYSQL_BIN_LOG::new_file_impl(bool need_lock)
close_on_error= TRUE; close_on_error= TRUE;
my_printf_error(ER_ERROR_ON_WRITE, my_printf_error(ER_ERROR_ON_WRITE,
ER_THD_OR_DEFAULT(current_thd, ER_CANT_OPEN_FILE), ER_THD_OR_DEFAULT(current_thd, ER_CANT_OPEN_FILE),
MYF(ME_FATALERROR), name, errno); MYF(ME_FATAL), name, errno);
goto end; goto end;
} }
bytes_written += r.data_written; bytes_written += r.data_written;
@ -5263,7 +5263,7 @@ int MYSQL_BIN_LOG::new_file_impl(bool need_lock)
/* handle reopening errors */ /* handle reopening errors */
if (unlikely(error)) 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; close_on_error= TRUE;
} }
@ -7745,10 +7745,10 @@ MYSQL_BIN_LOG::write_transaction_to_binlog_events(group_commit_entry *entry)
switch (entry->error) switch (entry->error)
{ {
case ER_ERROR_ON_WRITE: 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; break;
case ER_ERROR_ON_READ: 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); entry->error_cache->file_name, entry->commit_errno);
break; break;
default: default:
@ -7759,7 +7759,7 @@ MYSQL_BIN_LOG::write_transaction_to_binlog_events(group_commit_entry *entry)
*/ */
my_printf_error(entry->error, my_printf_error(entry->error,
"Error writing transaction to binary log: %d", "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. when the transaction has been safely committed in the engine.
*/ */
leader->cache_mngr->delayed_error= true; 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; check_purge= false;
} }
/* In case of binlog rotate, update the correct current binlog offset. */ /* In case of binlog rotate, update the correct current binlog offset. */

View File

@ -3670,12 +3670,12 @@ void my_message_sql(uint error, const char *str, myf MyFlags)
DBUG_ASSERT(str != NULL); DBUG_ASSERT(str != NULL);
DBUG_ASSERT(error != 0); DBUG_ASSERT(error != 0);
if (MyFlags & ME_JUST_INFO) if (MyFlags & ME_NOTE)
{ {
level= Sql_condition::WARN_LEVEL_NOTE; level= Sql_condition::WARN_LEVEL_NOTE;
func= sql_print_information; func= sql_print_information;
} }
else if (MyFlags & ME_JUST_WARNING) else if (MyFlags & ME_WARNING)
{ {
level= Sql_condition::WARN_LEVEL_WARN; level= Sql_condition::WARN_LEVEL_WARN;
func= sql_print_warning; func= sql_print_warning;
@ -3688,7 +3688,7 @@ void my_message_sql(uint error, const char *str, myf MyFlags)
if (likely(thd)) if (likely(thd))
{ {
if (unlikely(MyFlags & ME_FATALERROR)) if (unlikely(MyFlags & ME_FATAL))
thd->is_fatal_error= 1; thd->is_fatal_error= 1;
(void) thd->raise_condition(error, NULL, level, str); (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 */ /* When simulating OOM, skip writing to error log to avoid mtr errors */
DBUG_EXECUTE_IF("simulate_out_of_memory", DBUG_VOID_RETURN;); 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 */ (*func)("%s: %s", my_progname_short, str); /* purecov: inspected */
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
@ -9813,10 +9813,10 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
errors. errors.
*/ */
if (global_system_variables.log_warnings >= 10) 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() */ /* Log all errors not handled by thd->handle_error() to my_message_sql() */
if (global_system_variables.log_warnings >= 11) if (global_system_variables.log_warnings >= 11)
my_global_flags|= ME_NOREFRESH; my_global_flags|= ME_ERROR_LOG;
if (my_assert_on_error) if (my_assert_on_error)
debug_assert_if_crashed_table= 1; debug_assert_if_crashed_table= 1;

View File

@ -318,7 +318,7 @@ int opt_sum_query(THD *thd,
error= tl->table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); error= tl->table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
if (unlikely(error)) if (unlikely(error))
{ {
tl->table->file->print_error(error, MYF(ME_FATALERROR)); tl->table->file->print_error(error, MYF(ME_FATAL));
DBUG_RETURN(error); DBUG_RETURN(error);
} }
count*= tl->table->file->stats.records; count*= tl->table->file->stats.records;

View File

@ -1091,7 +1091,7 @@ bool Master_info_index::init_all_master_info()
if ((index_file_nr= my_open(index_file_name, if ((index_file_nr= my_open(index_file_name,
O_RDWR | O_CREAT | O_BINARY , 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)) || my_sync(index_file_nr, MYF(MY_WME)) ||
init_io_cache(&index_file, index_file_nr, init_io_cache(&index_file, index_file_nr,
IO_SIZE, READ_CACHE, 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) if (warning != Sql_condition::WARN_LEVEL_NOTE)
my_error(WARN_NO_MASTER_INFO, my_error(WARN_NO_MASTER_INFO,
MYF(warning == Sql_condition::WARN_LEVEL_WARN ? MYF(warning == Sql_condition::WARN_LEVEL_WARN ?
ME_JUST_WARNING : 0), ME_WARNING : 0),
(int) connection_name->length, connection_name->str); (int) connection_name->length, connection_name->str);
mysql_mutex_unlock(&LOCK_active_mi); mysql_mutex_unlock(&LOCK_active_mi);
DBUG_RETURN(0); 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) if (!mi && warning != Sql_condition::WARN_LEVEL_NOTE)
{ {
my_error(WARN_NO_MASTER_INFO, 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), 0),
(int) connection_name->length, (int) connection_name->length,
connection_name->str); connection_name->str);

View File

@ -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)) thd->spcont->set_case_expr(thd, m_case_expr_id, &null_item))
{ {
/* If this also failed, we have to abort. */ /* 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 else

View File

@ -173,7 +173,7 @@ void mysql_client_binlog_statement(THD* thd)
*/ */
if (!(rli && buf)) 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; goto end;
} }

View File

@ -1500,7 +1500,7 @@ bool THD::set_db(const LEX_CSTRING *new_db)
const char *tmp= NULL; const char *tmp= NULL;
if (new_db->str) 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; result= 1;
} }
@ -2659,7 +2659,7 @@ CHANGED_TABLE_LIST* THD::changed_table_dup(const char *key, size_t key_length)
key_length + 1); key_length + 1);
if (!new_table) 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); ALIGN_SIZE(sizeof(TABLE_LIST)) + key_length + 1);
set_killed(KILL_CONNECTION); set_killed(KILL_CONNECTION);
return 0; return 0;
@ -3316,7 +3316,7 @@ int select_export::send_data(List<Item> &items)
set_if_smaller(estimated_bytes, UINT_MAX32); set_if_smaller(estimated_bytes, UINT_MAX32);
if (cvt_str.realloc((uint32) estimated_bytes)) 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; goto err;
} }
@ -3574,7 +3574,7 @@ int select_singlerow_subselect::send_data(List<Item> &items)
if (it->assigned()) if (it->assigned())
{ {
my_message(ER_SUBQUERY_NO_1_ROW, ER_THD(thd, ER_SUBQUERY_NO_1_ROW), 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); DBUG_RETURN(1);
} }
if (unit->offset_limit_cnt) if (unit->offset_limit_cnt)

View File

@ -764,7 +764,7 @@ bool With_element::set_unparsed_spec(THD *thd, char *spec_start, char *spec_end)
if (!unparsed_spec.str) if (!unparsed_spec.str)
{ {
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), my_error(ER_OUTOFMEMORY, MYF(ME_FATAL),
static_cast<int>(unparsed_spec.length)); static_cast<int>(unparsed_spec.length));
return true; return true;
} }

View File

@ -766,7 +766,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
else else
{ {
table->file->print_error(error, table->file->print_error(error,
MYF(thd->lex->ignore ? ME_JUST_WARNING : 0)); MYF(thd->lex->ignore ? ME_WARNING : 0));
if (thd->is_error()) if (thd->is_error())
{ {
error= 1; error= 1;

View File

@ -1719,7 +1719,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
*/ */
if (info->ignore) 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 ok_or_after_trg_err; /* Ignoring a not fatal error, return 0 */
} }
goto err; goto err;
@ -1844,7 +1844,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
{ {
if (!(thd->variables.old_behavior & if (!(thd->variables.old_behavior &
OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE)) 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 ok_or_after_trg_err;
} }
goto err; goto err;
@ -2026,7 +2026,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
goto err; goto err;
if (!(thd->variables.old_behavior & if (!(thd->variables.old_behavior &
OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE)) 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); table->file->restore_auto_increment(prev_insert_id);
goto ok_or_after_trg_err; 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_db(&table_list->db);
di->thd.set_query(my_strndup(table_list->table_name.str, di->thd.set_query(my_strndup(table_list->table_name.str,
table_list->table_name.length, table_list->table_name.length,
MYF(MY_WME | ME_FATALERROR)), MYF(MY_WME | ME_FATAL)),
table_list->table_name.length, system_charset_info); table_list->table_name.length, system_charset_info);
if (di->thd.db.str == NULL || di->thd.query() == NULL) 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); mysql_mutex_unlock(&di->mutex);
di->unlock(); di->unlock();
delete di; 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; goto end_create;
} }
@ -3261,7 +3261,7 @@ bool Delayed_insert::handle_inserts(void)
or if another thread is removing the current table definition or if another thread is removing the current table definition
from the table cache. 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); table->s->table_name.str);
goto err; goto err;
} }
@ -3434,7 +3434,7 @@ bool Delayed_insert::handle_inserts(void)
{ {
/* This is not known to happen. */ /* This is not known to happen. */
my_error(ER_DELAYED_CANT_CHANGE_LOCK, my_error(ER_DELAYED_CANT_CHANGE_LOCK,
MYF(ME_FATALERROR | ME_NOREFRESH), MYF(ME_FATAL | ME_ERROR_LOG),
table->s->table_name.str); table->s->table_name.str);
goto err; goto err;
} }

View File

@ -608,7 +608,7 @@ struct ilink
struct ilink **prev,*next; struct ilink **prev,*next;
static void *operator new(size_t size) throw () 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) static void operator delete(void* ptr_arg, size_t)
{ {

View File

@ -7521,7 +7521,7 @@ bool check_stack_overrun(THD *thd, long margin,
if (ebuff) { if (ebuff) {
my_snprintf(ebuff, MYSQL_ERRMSG_SIZE, ER_THD(thd, ER_STACK_OVERRUN_NEED_MORE), my_snprintf(ebuff, MYSQL_ERRMSG_SIZE, ER_THD(thd, ER_STACK_OVERRUN_NEED_MORE),
stack_used, my_thread_stack_size, margin); 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; delete [] ebuff;
} }
return 1; return 1;

View File

@ -2644,7 +2644,7 @@ char *generate_partition_syntax(THD *thd, partition_info *part_info,
default: default:
DBUG_ASSERT(0); DBUG_ASSERT(0);
/* We really shouldn't get here, no use in continuing from here */ /* 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); DBUG_RETURN(NULL);
} }
if (part_info->part_type == VERSIONING_PARTITION) 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_data,
lpt->pack_frm_len)))) 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)) if (mysql_trans_commit_alter_copy_data(thd))

View File

@ -1514,7 +1514,7 @@ static int mysql_test_select(Prepared_statement *stmt,
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send(thd))) 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))); static_cast<int>(sizeof(select_send)));
goto error; goto error;
} }
@ -2085,7 +2085,7 @@ static bool mysql_test_multidelete(Prepared_statement *stmt,
if (add_item_to_list(thd, new (thd->mem_root) if (add_item_to_list(thd, new (thd->mem_root)
Item_null(thd))) Item_null(thd)))
{ {
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), 0); my_error(ER_OUTOFMEMORY, MYF(ME_FATAL), 0);
goto error; goto error;
} }
@ -4718,7 +4718,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
alloc_query(thd, (char*) expanded_query->ptr(), alloc_query(thd, (char*) expanded_query->ptr(),
expanded_query->length())) 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; goto error;
} }
/* /*

View File

@ -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 We don't want this error to be converted to a warning, e.g. in case of
INSERT IGNORE ... SELECT. INSERT IGNORE ... SELECT.
*/ */
table->file->print_error(error, MYF(ME_FATALERROR)); table->file->print_error(error, MYF(ME_FATAL));
DBUG_RETURN(1); DBUG_RETURN(1);
} }
new_table= *table; 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))) if (unlikely(copy_blobs(first_field)))
{ {
my_message(ER_OUTOFMEMORY, ER_THD(thd,ER_OUTOFMEMORY), my_message(ER_OUTOFMEMORY, ER_THD(thd,ER_OUTOFMEMORY),
MYF(ME_FATALERROR)); MYF(ME_FATAL));
error=0; error=0;
goto err; goto err;
} }
@ -23469,7 +23469,7 @@ void calc_group_buffer(TMP_TABLE_PARAM *param, ORDER *group)
default: default:
/* This case should never be choosen */ /* This case should never be choosen */
DBUG_ASSERT(0); DBUG_ASSERT(0);
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR)); my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
} }
} }
parts++; parts++;

View File

@ -7329,7 +7329,7 @@ static int get_schema_partitions_record(THD *thd, TABLE_LIST *tables,
break; break;
default: default:
DBUG_ASSERT(0); DBUG_ASSERT(0);
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR)); my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATAL));
DBUG_RETURN(1); DBUG_RETURN(1);
} }
table->field[7]->set_notnull(); table->field[7]->set_notnull();

View File

@ -974,7 +974,7 @@ update_begin:
myf flags= 0; myf flags= 0;
if (table->file->is_fatal_error(error, HA_CHECK_ALL)) 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); prepare_record_for_error_message(error, table);
table->file->print_error(error,MYF(flags)); table->file->print_error(error,MYF(flags));
@ -1085,7 +1085,7 @@ update_begin:
{ {
/* purecov: begin inspected */ /* purecov: begin inspected */
prepare_record_for_error_message(loc_error, table); 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; error= 1;
/* purecov: end */ /* purecov: end */
} }
@ -2381,7 +2381,7 @@ int multi_update::send_data(List<Item> &not_used_values)
myf flags= 0; myf flags= 0;
if (table->file->is_fatal_error(error, HA_CHECK_ALL)) 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); prepare_record_for_error_message(error, table);
table->file->print_error(error,MYF(flags)); table->file->print_error(error,MYF(flags));
@ -2756,7 +2756,7 @@ int multi_update::do_updates()
err: err:
{ {
prepare_record_for_error_message(local_error, err_table); 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: err2:

View File

@ -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 of the statement because the field item does not have a field
pointer at that time 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), my_error(ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(warn),
"AUTO_INCREMENT", vcol->get_vcol_type_name(), res.name); "AUTO_INCREMENT", vcol->get_vcol_type_name(), res.name);
if (!warn) if (!warn)
@ -5255,7 +5255,7 @@ int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure)
main_view->db.str); main_view->db.str);
const char *name_table= (main_view->view ? main_view->view_name.str : const char *name_table= (main_view->view ? main_view->view_name.str :
main_view->table_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); name_db, name_table);
return ignore_failure ? VIEW_CHECK_SKIP : VIEW_CHECK_ERROR; return ignore_failure ? VIEW_CHECK_SKIP : VIEW_CHECK_ERROR;
} }
@ -5287,7 +5287,7 @@ int TABLE::verify_constraints(bool ignore_failure)
in_use->is_error()) in_use->is_error())
{ {
my_error(ER_CONSTRAINT_FAILED, 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); s->db.str, s->table_name.str);
return ignore_failure ? VIEW_CHECK_SKIP : VIEW_CHECK_ERROR; return ignore_failure ? VIEW_CHECK_SKIP : VIEW_CHECK_ERROR;
} }

View File

@ -56,11 +56,6 @@
#endif #endif
#define ER_THD_OR_DEFAULT(thd,X) ((thd) ? ER_THD(thd, (X)) : ER_DEFAULT(X)) #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_USE_LOCKS 1 /* Lock used databases */
#define SPECIAL_NO_NEW_FUNC 2 /* Skip new functions */ #define SPECIAL_NO_NEW_FUNC 2 /* Skip new functions */
#define SPECIAL_SKIP_SHOW_DB 4 /* Don't allow 'show db' */ #define SPECIAL_SKIP_SHOW_DB 4 /* Don't allow 'show db' */

View File

@ -802,7 +802,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
#endif /* HAVE_READLINK */ #endif /* HAVE_READLINK */
{ {
if (create_info->data_file_name) 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, fn_format(name_buff, name, "", ARZ,
MY_REPLACE_EXT | MY_UNPACK_FILENAME); 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. */ /* Archive engine never uses INDEX DIRECTORY. */
if (create_info->index_file_name) 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 There is a chance that the file was "discovered". In this case

View File

@ -1385,7 +1385,7 @@ int ha_tina::rnd_end()
if (mysql_file_write(update_temp_file, if (mysql_file_write(update_temp_file,
(uchar*) (file_buff->ptr() + (uchar*) (file_buff->ptr() +
(write_begin - file_buff->start())), (write_begin - file_buff->start())),
(size_t)write_length, MYF_RW)) (size_t)write_length, MYF(MY_WME+MY_NABP)))
goto error; goto error;
temp_file_length+= write_length; 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); write_end= MY_MIN(file_buff->end(), current_position);
if ((write_end - write_begin) && if ((write_end - write_begin) &&
(mysql_file_write(repair_file, (uchar*)file_buff->ptr(), (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); DBUG_RETURN(-1);
write_begin= write_end; write_begin= write_end;

View File

@ -11828,7 +11828,7 @@ create_table_info_t::parse_table_name(
} }
if (m_create_info->index_file_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"); "INDEX DIRECTORY");
} }
@ -20948,10 +20948,10 @@ ib_senderrf(
switch (level) { switch (level) {
case IB_LOG_LEVEL_INFO: case IB_LOG_LEVEL_INFO:
l = ME_JUST_INFO; l = ME_NOTE;
break; break;
case IB_LOG_LEVEL_WARN: case IB_LOG_LEVEL_WARN:
l = ME_JUST_WARNING; l = ME_WARNING;
break; break;
case IB_LOG_LEVEL_ERROR: case IB_LOG_LEVEL_ERROR:
sd_notifyf(0, "STATUS=InnoDB: Error: %s", str); sd_notifyf(0, "STATUS=InnoDB: Error: %s", str);

View File

@ -3506,7 +3506,7 @@ static int mark_recovery_start(const char* log_dir)
int res; int res;
DBUG_ENTER("mark_recovery_start"); DBUG_ENTER("mark_recovery_start");
if (!(maria_recover_options & HA_RECOVER_ANY)) 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" " --aria-recover-options[=...] to automatically check and"
" repair tables when logs are removed by option" " repair tables when logs are removed by option"
" --aria-force-start-after-recovery-failures=#"); " --aria-force-start-after-recovery-failures=#");
@ -3524,7 +3524,7 @@ static int mark_recovery_start(const char* log_dir)
" recovery from logs", " recovery from logs",
(res ? "failed to remove some" : "removed all"), (res ? "failed to remove some" : "removed all"),
recovery_failures); recovery_failures);
ma_message_no_user((res ? 0 : ME_JUST_WARNING), msg); ma_message_no_user((res ? 0 : ME_WARNING), msg);
} }
else else
res= ma_control_file_write_and_force(last_checkpoint_lsn, last_logno, res= ma_control_file_write_and_force(last_checkpoint_lsn, last_logno,

View File

@ -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 prints a message from a task not connected to any user (checkpoint
and recovery for example). and recovery for example).
@param level 0 if error, ME_JUST_WARNING if warning, @param level 0 if error, ME_WARNING if warning,
ME_JUST_INFO if info ME_NOTE if info
@param sentence text to write @param sentence text to write
*/ */
#define ma_message_no_user(level, sentence) \ #define ma_message_no_user(level, sentence) \

View File

@ -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" "Control file must be from a newer version; zero-ing out %u"
" unknown bytes in control file at offset %u", zeroed, " unknown bytes in control file at offset %u", zeroed,
cf_changeable_size + cf_create_time_size); cf_changeable_size + cf_create_time_size);
ma_message_no_user(ME_JUST_WARNING, msg); ma_message_no_user(ME_WARNING, msg);
} }
else else
{ {

View File

@ -156,7 +156,7 @@ ma_crypt_read(MARIA_SHARE* share, uchar *buff)
{ {
my_printf_error(HA_ERR_UNSUPPORTED, my_printf_error(HA_ERR_UNSUPPORTED,
"Unsupported crypt scheme! type: %d iv_length: %d\n", "Unsupported crypt scheme! type: %d iv_length: %d\n",
MYF(ME_FATALERROR|ME_NOREFRESH), MYF(ME_FATAL|ME_ERROR_LOG),
type, iv_length); type, iv_length);
return 0; 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_errno= HA_ERR_DECRYPTION_FAILED;
my_printf_error(HA_ERR_DECRYPTION_FAILED, my_printf_error(HA_ERR_DECRYPTION_FAILED,
"Unknown key id %u. Can't continue!", "Unknown key id %u. Can't continue!",
MYF(ME_FATALERROR|ME_NOREFRESH), MYF(ME_FATAL|ME_ERROR_LOG),
crypt_data->scheme.key_id); crypt_data->scheme.key_id);
return 1; 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_errno= HA_ERR_DECRYPTION_FAILED;
my_printf_error(HA_ERR_DECRYPTION_FAILED, my_printf_error(HA_ERR_DECRYPTION_FAILED,
"failed to encrypt '%s' rc: %d dstlen: %u size: %u\n", "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); share->open_file_name.str, rc, dstlen, size);
return 1; 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_errno= HA_ERR_DECRYPTION_FAILED;
my_printf_error(HA_ERR_DECRYPTION_FAILED, my_printf_error(HA_ERR_DECRYPTION_FAILED,
"failed to decrypt '%s' rc: %d dstlen: %u size: %u\n", "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); share->open_file_name.str, rc, dstlen, size);
return 1; return 1;
} }

View File

@ -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; DBUG_VOID_RETURN;
} }

View File

@ -146,7 +146,7 @@ my_bool maria_upgrade()
my_message(HA_ERR_INITIALIZATION, my_message(HA_ERR_INITIALIZATION,
"Found old style Maria log files; " "Found old style Maria log files; "
"Converting them to Aria names", "Converting them to Aria names",
MYF(ME_JUST_INFO)); MYF(ME_NOTE));
for (i= 0; i < dir->number_of_files; i++) for (i= 0; i < dir->number_of_files; i++)
{ {

View File

@ -184,7 +184,7 @@ void maria_recover_error_handler_hook(uint error, const char *str,
static void print_preamble() 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) if (!error)
{ {
ma_message_no_user(ME_JUST_INFO, "recovery done"); ma_message_no_user(ME_NOTE, "recovery done");
maria_recovery_changed_data= 1; maria_recovery_changed_data= 1;
} }
} }

View File

@ -30,13 +30,11 @@
/* static variables */ /* static variables */
#undef MIN_SORT_MEMORY #undef MIN_SORT_MEMORY
#undef MYF_RW
#undef DISK_BUFFER_SIZE #undef DISK_BUFFER_SIZE
#define MERGEBUFF 15 #define MERGEBUFF 15
#define MERGEBUFF2 31 #define MERGEBUFF2 31
#define MIN_SORT_MEMORY (4096-MALLOC_OVERHEAD) #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) #define DISK_BUFFER_SIZE (IO_SIZE*128)
/* How many keys we can keep in memory */ /* How many keys we can keep in memory */

View File

@ -1807,7 +1807,7 @@ bool ha_myisam::check_and_repair(THD *thd)
sql_print_information("Making backup of index file %s with extension '%s'", sql_print_information("Making backup of index file %s with extension '%s'",
file->s->index_file_name, buff); file->s->index_file_name, buff);
mi_make_backup_of_index(file, check_opt.start_time, mi_make_backup_of_index(file, check_opt.start_time,
MYF(MY_WME | ME_JUST_WARNING)); MYF(MY_WME | ME_WARNING));
} }
check_opt.flags= check_opt.flags=
(((myisam_recover_options & (((myisam_recover_options &

View File

@ -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_create_backup_name(buff, "", param->backup_time);
my_printf_error(ER_GET_ERRMSG, my_printf_error(ER_GET_ERRMSG,
"Making backup of data file %s with extension '%s'", "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); buff);
} }

View File

@ -127,7 +127,7 @@ void mi_report_error(int errcode, const char *file_name)
if ((lgt= strlen(file_name)) > 64) if ((lgt= strlen(file_name)) > 64)
file_name+= lgt - 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; DBUG_VOID_RETURN;
} }

View File

@ -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))) 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); sizeof(uint)*length*2);
return 0; return 0;
} }

View File

@ -28,12 +28,10 @@
/* static variables */ /* static variables */
#undef MYF_RW
#undef DISK_BUFFER_SIZE #undef DISK_BUFFER_SIZE
#define MERGEBUFF 15 #define MERGEBUFF 15
#define MERGEBUFF2 31 #define MERGEBUFF2 31
#define MYF_RW MYF(MY_NABP | MY_WME | MY_WAIT_IF_FULL)
#define DISK_BUFFER_SIZE (IO_SIZE*128) #define DISK_BUFFER_SIZE (IO_SIZE*128)
/* How many keys we can keep in memory */ /* How many keys we can keep in memory */

View File

@ -6783,7 +6783,7 @@ int ha_rocksdb::create_cfs(
tbl_def_arg->full_tablename().c_str(), tbl_def_arg->full_tablename().c_str(),
table_arg->key_info[i].key_part[part].field->field_name.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 // The `rocksdb_datadir` setting should be used to configure RocksDB data
// directory. // directory.
print_error(HA_ERR_ROCKSDB_TABLE_DATA_DIRECTORY_NOT_SUPPORTED, print_error(HA_ERR_ROCKSDB_TABLE_DATA_DIRECTORY_NOT_SUPPORTED,
MYF(ME_JUST_WARNING)); MYF(ME_WARNING));
DBUG_RETURN(HA_WRONG_CREATE_OPTION); DBUG_RETURN(HA_WRONG_CREATE_OPTION);
} }
if (create_info->index_file_name) { if (create_info->index_file_name) {
// Similar check for INDEX DIRECTORY as well. // Similar check for INDEX DIRECTORY as well.
print_error(HA_ERR_ROCKSDB_TABLE_INDEX_DIRECTORY_NOT_SUPPORTED, print_error(HA_ERR_ROCKSDB_TABLE_INDEX_DIRECTORY_NOT_SUPPORTED,
MYF(ME_JUST_WARNING)); MYF(ME_WARNING));
DBUG_RETURN(HA_WRONG_CREATE_OPTION); DBUG_RETURN(HA_WRONG_CREATE_OPTION);
} }