Merge branch '2.3' into develop
This commit is contained in:
@ -402,12 +402,12 @@ static int signal_set(int sig, void (* handler)(int));
|
||||
|
||||
static void sigfatal_handler(int i)
|
||||
{
|
||||
if (fatal_handling)
|
||||
{
|
||||
fprintf(stderr, "Fatal signal %d while backtracing\n", i);
|
||||
_exit(1);
|
||||
}
|
||||
fatal_handling = 1;
|
||||
// The same signal being handled *now* can occur in another thread (and is often likely).
|
||||
// By setting the default handler here we will always get a core, but not necessarily
|
||||
// the backtrace into the log file. This should be overhauled to proper signal handling
|
||||
// (MXS-599).
|
||||
signal_set(i, SIG_DFL);
|
||||
|
||||
MXS_CONFIG* cnf = config_get_global_options();
|
||||
fprintf(stderr,
|
||||
"Fatal: MaxScale " MAXSCALE_VERSION " received fatal signal %d. "
|
||||
@ -435,7 +435,6 @@ static void sigfatal_handler(int i)
|
||||
|
||||
/* re-raise signal to enforce core dump */
|
||||
fprintf(stderr, "\n\nWriting core dump\n");
|
||||
signal_set(i, SIG_DFL);
|
||||
raise(i);
|
||||
}
|
||||
|
||||
|
@ -1367,6 +1367,7 @@ namespace maxscale
|
||||
std::string get_canonical(GWBUF* querybuf)
|
||||
{
|
||||
std::string rval;
|
||||
rval.reserve(gwbuf_length(querybuf) - MYSQL_HEADER_LEN + 1);
|
||||
mxs::Buffer buf(querybuf);
|
||||
|
||||
enum state
|
||||
|
@ -61,6 +61,20 @@ bool qc_mysql_is_ps_command(uint8_t cmd)
|
||||
|| cmd == MXS_COM_STMT_RESET;
|
||||
}
|
||||
|
||||
// Copied from mysql_common.cc
|
||||
uint32_t qc_mysql_extract_ps_id(GWBUF* buffer)
|
||||
{
|
||||
uint32_t rval = 0;
|
||||
uint8_t id[MYSQL_PS_ID_SIZE];
|
||||
|
||||
if (gwbuf_copy_data(buffer, MYSQL_PS_ID_OFFSET, sizeof(id), id) == sizeof(id))
|
||||
{
|
||||
rval = gw_mysql_get_byte4(id);
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
bool have_semicolon(const char* ptr, int len)
|
||||
{
|
||||
for (int i = 0; i < len; i++)
|
||||
@ -376,7 +390,8 @@ uint32_t QueryClassifier::ps_get_type(std::string id) const
|
||||
|
||||
void QueryClassifier::ps_erase(GWBUF* buffer)
|
||||
{
|
||||
return m_sPs_manager->erase(buffer);
|
||||
m_ps_handles.erase(qc_mysql_extract_ps_id(buffer));
|
||||
m_sPs_manager->erase(buffer);
|
||||
}
|
||||
|
||||
bool QueryClassifier::query_type_is_read_only(uint32_t qtype) const
|
||||
|
Reference in New Issue
Block a user