Merge branch '2.3' into 2.4

This commit is contained in:
Markus Mäkelä
2019-07-04 09:39:52 +03:00
6 changed files with 29 additions and 12 deletions

View File

@ -2945,6 +2945,7 @@ void config_set_global_defaults()
gateway.promoted_at = 0;
gateway.load_persisted_configs = true;
gateway.max_auth_errors_until_block = DEFAULT_MAX_AUTH_ERRORS_UNTIL_BLOCK;
gateway.users_refresh_time = USERS_REFRESH_TIME_DEFAULT;
gateway.peer_hosts[0] = '\0';
gateway.peer_user[0] = '\0';

View File

@ -1955,6 +1955,7 @@ static void dcb_hangup_foreach_worker(MXB_WORKER* worker, struct SERVER* server)
{
RoutingWorker* rworker = static_cast<RoutingWorker*>(worker);
int id = rworker->id();
DCB* old_current = this_thread.current_dcb;
for (DCB* dcb = this_unit.all_dcbs[id]; dcb; dcb = dcb->thread.next)
{
@ -1962,11 +1963,14 @@ static void dcb_hangup_foreach_worker(MXB_WORKER* worker, struct SERVER* server)
{
if (!dcb->dcb_errhandle_called)
{
this_thread.current_dcb = dcb;
dcb->func.hangup(dcb);
dcb->dcb_errhandle_called = true;
}
}
}
this_thread.current_dcb = old_current;
}
/**
@ -2500,10 +2504,10 @@ void dcb_process_timeouts(int thr)
if (idle > dcb->service->net_write_timeout * 10)
{
MXS_WARNING("network write timed out for '%s'@%s, ",
dcb->user ? dcb->user : "<unknown>",
dcb->remote ? dcb->remote : "<unknown>");
dcb->session->close_reason = SESSION_CLOSE_TIMEOUT;
poll_fake_hangup_event(dcb);
dcb->user ? dcb->user : "<unknown>",
dcb->remote ? dcb->remote : "<unknown>");
dcb->session->close_reason = SESSION_CLOSE_TIMEOUT;
poll_fake_hangup_event(dcb);
}
}
}

View File

@ -956,8 +956,15 @@ QueryClassifier::current_target_t QueryClassifier::handle_multi_temp_and_load(
bool QueryClassifier::query_continues_ps(uint8_t cmd, uint32_t stmt_id, GWBUF* buffer)
{
bool rval = false;
uint8_t prev_cmd = m_route_info.command();
if (cmd == COM_STMT_FETCH)
if (prev_cmd == MXS_COM_STMT_SEND_LONG_DATA
&& (cmd == MXS_COM_STMT_EXECUTE || cmd == MXS_COM_STMT_SEND_LONG_DATA))
{
// PS execution must be sent to the same server where the data was sent
rval = true;
}
else if (cmd == COM_STMT_FETCH)
{
// COM_STMT_FETCH should always go to the same target as the COM_STMT_EXECUTE
rval = true;