MXS-3121 Log stmt being classified in fatal signal handler

This will make it easier to fix classifier related crashes.
This commit is contained in:
Johan Wikman
2020-08-20 13:32:24 +03:00
parent c5870cbaba
commit 606ae6d2b0

View File

@ -434,6 +434,17 @@ static void sigfatal_handler(int i)
cnf->sysname,
cnf->release_string);
const char* pStmt;
size_t nStmt;
if (!qc_get_current_stmt(&pStmt, &nStmt))
{
pStmt = "none/unknown";
nStmt = strlen(pStmt);
}
MXS_ALERT("Statement currently being classified: %.*s", (int)nStmt, pStmt);
if (DCB* dcb = dcb_get_current())
{
if (dcb->session)