diff options
author | He Zhenxing <zhenxing.he@sun.com> | 2009-03-06 17:38:14 +0800 |
---|---|---|
committer | He Zhenxing <zhenxing.he@sun.com> | 2009-03-06 17:38:14 +0800 |
commit | 4cef9cc0262c5b07871a3e4b08ea2d0e9d704ddf (patch) | |
tree | 2f87ecb15bf2110f5197c10da49c1cf6db1420e1 /mysys/errors.c | |
parent | 5d5f0fcd47cce5f7a7b960b96fabc679e679ca23 (diff) | |
parent | c8532bc9796be534fc7870c9e3a540fcb5884de6 (diff) | |
download | mariadb-git-4cef9cc0262c5b07871a3e4b08ea2d0e9d704ddf.tar.gz |
Merge BUG#22082 from 5.0-bugteam to 5.1-bugteam
Diffstat (limited to 'mysys/errors.c')
-rw-r--r-- | mysys/errors.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mysys/errors.c b/mysys/errors.c index 537a75c6ef3..8d3303cac9f 100644 --- a/mysys/errors.c +++ b/mysys/errors.c @@ -39,7 +39,7 @@ const char * NEAR globerrs[GLOBERRS]= "Can't change dir to '%s' (Errcode: %d)", "Warning: '%s' had %d links", "Warning: %d files and %d streams is left open\n", - "Disk is full writing '%s' (Errcode: %d). Waiting for someone to free space... Retry in %d secs", + "Disk is full writing '%s' (Errcode: %d). Waiting for someone to free space... (Expect up to %d secs delay for server to continue after freeing disk space)", "Can't create directory '%s' (Errcode: %d)", "Character set '%s' is not a compiled character set and is not specified in the '%s' file", "Out of resources when opening file '%s' (Errcode: %d)", @@ -92,3 +92,17 @@ void init_glob_errs() EE(EE_FILE_NOT_CLOSED) = "File '%s' (fileno: %d) was not closed"; } #endif + +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_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)); +} |