diff options
author | Venkatesh Duggirala <venkatesh.duggirala@oracle.com> | 2013-01-02 18:32:38 +0530 |
---|---|---|
committer | Venkatesh Duggirala <venkatesh.duggirala@oracle.com> | 2013-01-02 18:32:38 +0530 |
commit | ce7e7a99a02000f301470d24087bcc7e813e85ec (patch) | |
tree | 57ce0b9be34a77613b322607f3cc26983de6c0cc /mysys/errors.c | |
parent | cc2df0069dc185421dc85ce7ab4bdff5e09020a6 (diff) | |
parent | 39323920302a039ac7e3a80052fbd68d31e5e75d (diff) | |
download | mariadb-git-ce7e7a99a02000f301470d24087bcc7e813e85ec.tar.gz |
BUG#11753923-SQL THREAD CRASHES ON DISK FULL
Merging fix from mysql-5.1
Diffstat (limited to 'mysys/errors.c')
-rw-r--r-- | mysys/errors.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/mysys/errors.c b/mysys/errors.c index b976578b26c..b518b442d6b 100644 --- a/mysys/errors.c +++ b/mysys/errors.c @@ -99,17 +99,29 @@ 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); } |