mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -61,7 +61,7 @@ private:
|
||||
bool
|
||||
Prelock_error_handler::handle_error(uint sql_errno,
|
||||
const char * /* message */,
|
||||
MYSQL_ERROR::enum_warning_level /* level */,
|
||||
MYSQL_ERROR::enum_warning_level level,
|
||||
THD * /* thd */)
|
||||
{
|
||||
if (sql_errno == ER_NO_SUCH_TABLE)
|
||||
@ -70,7 +70,8 @@ Prelock_error_handler::handle_error(uint sql_errno,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
m_unhandled_errors++;
|
||||
if (level == MYSQL_ERROR::WARN_LEVEL_ERROR)
|
||||
m_unhandled_errors++;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user