MySQL 9.1.0
Source Code Documentation
log_source_backtrace.h File Reference

Go to the source code of this file.

Functions

log_service_error log_error_read_backtrace (const char *log_name)
 Read stacktrace from previous failure. More...
 

Function Documentation

◆ log_error_read_backtrace()

log_service_error log_error_read_backtrace ( const char *  log_name)

Read stacktrace from previous failure.

The signal-handler attempts to write a stacktrace to stderr. As stderr (and stdout) are redirected to the "traditional" error-log, that's where we'll have to look for stacktraces, even if we use a different log-sink otherwise (e.g. JSON, syslog, etc.).

Once we have determined whether such a log exists and is readable, we call

See also
log_error_read_backtrace_loop() to do the actual reading and parsing.

It should be noted that at the point this function is normally called, buffered error logging will not have been flushed yet.

Parameters
log_nameThe log file to read (log_error_dest).
Return values
LOG_SERVICE_SUCCESSSuccess (log read and parsed)
LOG_SERVICE_UNABLE_TO_READCould not read/access() file
LOG_SERVICE_INVALID_ARGUMENTInvalid log-file name
LOG_SERVICE_ARGUMENT_TOO_LONGFile-name too long
otherwiseReturn value from reader