1
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
1
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
3
3
This program is free software; you can redistribute it and/or modify
4
4
it under the terms of the GNU General Public License as published by
103
We cannot call my_error/my_printf_error here in this function.
104
Those functions will set status variable in diagnostic area
105
and there is no provision to reset them back.
106
Here we are waiting for free space and will wait forever till
107
space is created. So just giving warning in the error file
102
110
void wait_for_free_space(const char *filename, int errors)
105
my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH),
112
if (!(errors % MY_WAIT_GIVE_USER_A_MESSAGE))
114
my_printf_warning(EE(EE_DISK_FULL),
106
115
filename,my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
107
if (!(errors % MY_WAIT_GIVE_USER_A_MESSAGE))
108
my_printf_error(EE_DISK_FULL,
109
"Retry in %d secs. Message reprinted in %d secs",
110
MYF(ME_BELL | ME_NOREFRESH),
116
my_printf_warning("Retry in %d secs. Message reprinted in %d secs",
111
117
MY_WAIT_FOR_USER_TO_FIX_PANIC,
112
118
MY_WAIT_GIVE_USER_A_MESSAGE * MY_WAIT_FOR_USER_TO_FIX_PANIC );
120
DBUG_EXECUTE_IF("simulate_no_free_space_error",
113
125
(void) sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC);