summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2013-01-02 16:31:58 +0530
committerVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2013-01-02 16:31:58 +0530
commit39323920302a039ac7e3a80052fbd68d31e5e75d (patch)
tree7dd36d76fc6d62327ef5cefc6e124d7d55cdf501 /include
parent10f8266d50ec134e72d9562e29d676c00249d9bb (diff)
downloadmariadb-git-39323920302a039ac7e3a80052fbd68d31e5e75d.tar.gz
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. include/my_sys.h: Provision to call sql_print_warning from mysys files mysys/errors.c: Replace my_error/my_printf_error with sql_print_warning() which prints the warning in error log. mysys/my_error.c: implementation of my_printf_warning mysys/my_write.c: Adding logic to break infinite loop in the simulation sql/mysqld.cc: Provision to call sql_print_warning from mysys files
Diffstat (limited to 'include')
-rw-r--r--include/my_sys.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 6bdb95e9707..1973f07ac13 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -234,6 +234,7 @@ extern char *home_dir; /* Home directory for user */
extern const char *my_progname; /* program-name (printed in errors) */
extern char NEAR curr_dir[]; /* Current directory for user */
extern int (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
+extern void(*sql_print_warning_hook)(const char *format,...);
extern int (*fatal_error_handler_hook)(uint my_err, const char *str,
myf MyFlags);
extern uint my_file_limit;
@@ -675,6 +676,7 @@ extern int my_error _VARARGS((int nr,myf MyFlags, ...));
extern int my_printf_error _VARARGS((uint my_err, const char *format,
myf MyFlags, ...))
ATTRIBUTE_FORMAT(printf, 2, 4);
+extern void my_printf_warning _VARARGS((const char * format, ...));
extern int my_error_register(const char **errmsgs, int first, int last);
extern const char **my_error_unregister(int first, int last);
extern int my_message(uint my_err, const char *str,myf MyFlags);