From 31c8c95bb204e74431412d07970a8133a352984f Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 2 Sep 2011 01:22:34 +0300 Subject: Added logging of all errors from my_read/my_write/my_pread/my_pwrite/my_open & my_malloc to mysqld error log if one sets log-warning to 10 or 11 The idea is that my_global_flags is ored to the MyFlags parameter for the above functions if the MY_WME flag is not set. As the my_global_flags has ME_JUST_INFO (mark error as 'note') and possible ME_NOREFRESH (write error to log) this will force mysqld to log the not critical error to the log as a note. include/my_sys.h: Moved MY_SYNC_DIR to ensure it never clashes with ME_JUST_INFO Added my_global_flags mysql-test/Makefile.am: Removed not used bugs directory mysys/my_init.c: Added my_global_flags, a variable that is ored to MyFlags in a those mysys functions we want extra logging. mysys/my_malloc.c: Added support for my_global_flags mysys/my_open.c: Added support for my_global_flags mysys/my_pread.c: Added support for my_global_flags mysys/my_read.c: Added support for my_global_flags mysys/my_static.c: Added my_global_flags mysys/my_write.c: Added support for my_global_flags sql/mysqld.cc: Set my_global_flags for warning levels 10 & 11 sql/sql_base.cc: Don't increment unhandled errors for notes or warnings. --- mysys/my_init.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysys/my_init.c') diff --git a/mysys/my_init.c b/mysys/my_init.c index e7ab9ba7a1f..0b0d7d85f15 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -77,6 +77,8 @@ my_bool my_init(void) mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ + my_global_flags= 0; + init_glob_errs(); my_progname_short= "unknown"; if (my_progname) -- cgit v1.2.1