MXS-3121 Expose statement currently being classified
Intended to be used from fatal signal handlers. As the statement will be returned only while classification is in process, if a statement is returned, it is an indication that the crash was caused by the classification.
This commit is contained in:
@ -5359,6 +5359,20 @@ int32_t qc_sqlite_set_options(uint32_t options)
|
||||
return rv;
|
||||
}
|
||||
|
||||
int32_t qc_sqlite_get_current_stmt(const char** ppStmt, size_t* pLen)
|
||||
{
|
||||
int32_t rv = QC_RESULT_ERROR;
|
||||
|
||||
if (this_thread.pInfo && this_thread.pInfo->m_pQuery && (this_thread.pInfo->m_nQuery != 0))
|
||||
{
|
||||
*ppStmt = this_thread.pInfo->m_pQuery;
|
||||
*pLen = this_thread.pInfo->m_nQuery;
|
||||
rv = QC_RESULT_OK;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
/**
|
||||
* EXPORTS
|
||||
*/
|
||||
@ -5395,7 +5409,8 @@ extern "C"
|
||||
qc_sqlite_info_dup,
|
||||
qc_sqlite_info_close,
|
||||
qc_sqlite_get_options,
|
||||
qc_sqlite_set_options
|
||||
qc_sqlite_set_options,
|
||||
qc_sqlite_get_current_stmt
|
||||
};
|
||||
|
||||
static MXS_MODULE info =
|
||||
|
Reference in New Issue
Block a user