1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

BUG#11753923-SQL THREAD CRASHES ON DISK FULL

Problem:If Disk becomes full while writing into the binlog,
then the server instance hangs till someone frees the space.
After user frees up the disk space, mysql server crashes
with an assert (m_status != DA_EMPTY)

Analysis: wait_for_free_space is being called in an
infinite loop i.e., server instance will hang until
someone frees up the space. So there is no need to
set status bit in diagnostic area.

Fix: Replace my_error/my_printf_error with
sql_print_warning() which prints the warning in error log.
This commit is contained in:
Venkatesh Duggirala
2013-01-02 16:31:58 +05:30
parent f5f40badc5
commit c72f687f21
5 changed files with 47 additions and 6 deletions

View File

@ -101,16 +101,28 @@ void init_glob_errs()
}
#endif
/*
We cannot call my_error/my_printf_error here in this function.
Those functions will set status variable in diagnostic area
and there is no provision to reset them back.
Here we are waiting for free space and will wait forever till
space is created. So just giving warning in the error file
should be enough.
*/
void wait_for_free_space(const char *filename, int errors)
{
if (errors == 0)
my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH),
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),
{
my_printf_warning(EE(EE_DISK_FULL),
filename,my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
my_printf_warning("Retry in %d secs. Message reprinted in %d secs",
MY_WAIT_FOR_USER_TO_FIX_PANIC,
MY_WAIT_GIVE_USER_A_MESSAGE * MY_WAIT_FOR_USER_TO_FIX_PANIC );
}
DBUG_EXECUTE_IF("simulate_file_write_error_once",
{
VOID(sleep(1));
return;
});
VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC));
}