Merge branch '2.3' into develop
This commit is contained in:
@ -1335,6 +1335,7 @@ static int gw_error_backend_event(DCB* dcb)
|
||||
*/
|
||||
static int gw_backend_hangup(DCB* dcb)
|
||||
{
|
||||
mxb_assert(dcb->n_close == 0);
|
||||
MXS_SESSION* session = dcb->session;
|
||||
|
||||
if (!dcb->persistentstart)
|
||||
|
@ -1111,8 +1111,6 @@ static int gw_read_normal_data(DCB* dcb, GWBUF* read_buffer, int nbytes_read)
|
||||
// is thread and not session specific.
|
||||
qc_set_sql_mode(static_cast<qc_sql_mode_t>(session->client_protocol_data));
|
||||
}
|
||||
|
||||
session_retain_statement(session, read_buffer);
|
||||
}
|
||||
/** Update the current protocol command being executed */
|
||||
else if (!process_client_commands(dcb, nbytes_read, &read_buffer))
|
||||
@ -1632,6 +1630,7 @@ static int route_by_statement(MXS_SESSION* session, uint64_t capabilities, GWBUF
|
||||
{
|
||||
// TODO: Do this only when RCAP_TYPE_CONTIGUOUS_INPUT is requested
|
||||
packetbuf = gwbuf_make_contiguous(packetbuf);
|
||||
session_retain_statement(session, packetbuf);
|
||||
|
||||
MySQLProtocol* proto = (MySQLProtocol*)session->client_dcb->protocol;
|
||||
|
||||
|
@ -226,7 +226,7 @@ bool RWSplitSession::route_stored_query()
|
||||
* to wait for a response before attempting another reroute */
|
||||
while (m_query_queue)
|
||||
{
|
||||
MXS_INFO("Routing stored queries");
|
||||
MXS_INFO(">>> Routing stored queries");
|
||||
GWBUF* query_queue = modutil_get_next_MySQL_packet(&m_query_queue);
|
||||
query_queue = gwbuf_make_contiguous(query_queue);
|
||||
mxb_assert(query_queue);
|
||||
@ -244,6 +244,9 @@ bool RWSplitSession::route_stored_query()
|
||||
GWBUF* temp_storage = m_query_queue;
|
||||
m_query_queue = NULL;
|
||||
|
||||
// The query needs to be explicitly parsed as it was processed multiple times
|
||||
qc_parse(query_queue, QC_COLLECT_ALL);
|
||||
|
||||
// TODO: Move the handling of queued queries to the client protocol
|
||||
// TODO: module where the command tracking is done automatically.
|
||||
uint8_t cmd = mxs_mysql_get_command(query_queue);
|
||||
@ -255,6 +258,8 @@ bool RWSplitSession::route_stored_query()
|
||||
MXS_ERROR("Failed to route queued query.");
|
||||
}
|
||||
|
||||
MXS_INFO("<<< Stored queries routed");
|
||||
|
||||
if (m_query_queue == NULL)
|
||||
{
|
||||
/** Query successfully routed and no responses are expected */
|
||||
|
Reference in New Issue
Block a user