-
Sujatha Sivakumar authored
ABORT_SERVER Problem: ======= When binlog_error_action == ABORT_SERVER then server writes to error log: [ERROR] An error occured during flushing cache to file. 'binlog_error_action' is set to 'ABORT_SERVER'. Hence aborting the server and calls _exit(MYSQLD_FAILURE_EXIT); Calling _exit means no core-dump is possible. Therefore nobody knows what was going on. Analysis: ======== Initially binlog_error_action was added for a special case where binary logging was not possible due to a readonly file system or diskfull. In these cases it was not possible to generate core file and the only option was to call _exit. But over a period of time the usage of binlog_error_action has increased and we started using binlog_error_action for handling other critical errors as well. Since _exit command doesn't generate are core-dump users will not get to know what went wrong with the system. Hence the _exit has to be replaced with abort() call. Fix: === Replaced "_exit" with "abort()" call at all places. Improved code comments. Existing code was using "my_error" function call to push error to client and "sql_print_error" to print error server error log. Printing to client and to server error log can be achieved with single "my_error" function call with some additional flags. Implemented those changes.
Sujatha Sivakumar authoredABORT_SERVER Problem: ======= When binlog_error_action == ABORT_SERVER then server writes to error log: [ERROR] An error occured during flushing cache to file. 'binlog_error_action' is set to 'ABORT_SERVER'. Hence aborting the server and calls _exit(MYSQLD_FAILURE_EXIT); Calling _exit means no core-dump is possible. Therefore nobody knows what was going on. Analysis: ======== Initially binlog_error_action was added for a special case where binary logging was not possible due to a readonly file system or diskfull. In these cases it was not possible to generate core file and the only option was to call _exit. But over a period of time the usage of binlog_error_action has increased and we started using binlog_error_action for handling other critical errors as well. Since _exit command doesn't generate are core-dump users will not get to know what went wrong with the system. Hence the _exit has to be replaced with abort() call. Fix: === Replaced "_exit" with "abort()" call at all places. Improved code comments. Existing code was using "my_error" function call to push error to client and "sql_print_error" to print error server error log. Printing to client and to server error log can be achieved with single "my_error" function call with some additional flags. Implemented those changes.
Loading