Dump statements on fatal signal

This should make it easier to figure out what is going on at the time of
the crash if statement collection is enabled.
This commit is contained in:
Markus Mäkelä 2019-07-19 09:39:15 +03:00
parent e3b1eebb15
commit 146b940245
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -427,6 +427,14 @@ static void sigfatal_handler(int i)
cnf->sysname,
cnf->release_string);
if (DCB* dcb = dcb_get_current())
{
if (dcb->session)
{
session_dump_statements(dcb->session);
}
}
auto cb = [](const char* symbol, const char* cmd) {
MXS_ALERT(" %s: %s", symbol, cmd);
};