summaryrefslogtreecommitdiff
path: root/mysys/errors.c
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2009-04-01 11:34:52 +0200
committerGuilhem Bichot <guilhem@mysql.com>2009-04-01 11:34:52 +0200
commitc71aae73f6f864c97cf17b3e872346666b871c3f (patch)
tree4895816aee1a0fcef08daa0f68bf1b1fe9aa2b5a /mysys/errors.c
parent3c59ba32ab9cca29e01bd8dd2130af83ead8bde0 (diff)
parent7ca1ebd83a1a7d291593be7a94f5a37298dfc863 (diff)
downloadmariadb-git-c71aae73f6f864c97cf17b3e872346666b871c3f.tar.gz
merge of 5.1-main into 5.1-maria. MyISAM changes are propagated to Maria except
those of davi.arnaut@sun.com-20090219210935-9vilvcisyyieffxl (TODO).
Diffstat (limited to 'mysys/errors.c')
-rw-r--r--mysys/errors.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/mysys/errors.c b/mysys/errors.c
index 3c690ed5ca4..d832ba37da3 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)",
@@ -94,3 +94,17 @@ void init_glob_errs()
EE(EE_CANT_CHMOD) = "Can't change mode for file '%s' to 0x%lx (Error: %d)";
}
#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));
+}