MXS-1625 Fix rebase breakage
This commit is contained in:
@ -305,88 +305,6 @@ RWSplitSession* RWSplit::newSession(MXS_SESSION *session)
|
||||
return rses;
|
||||
}
|
||||
|
||||
<<<<<<< 563fa2c840c70eaf98fc61289ab28db3aaf49932
|
||||
=======
|
||||
/**
|
||||
* @brief Close a router session
|
||||
*
|
||||
* Close a session with the router, this is the mechanism by which a router
|
||||
* may perform cleanup. The instance of the router that relates to
|
||||
* the relevant service is passed, along with the router session that is to
|
||||
* be closed. The freeSession will be called once the session has been closed.
|
||||
*
|
||||
* @param instance The router instance data
|
||||
* @param session The router session being closed
|
||||
*/
|
||||
void RWSplitSession::close()
|
||||
{
|
||||
close_all_connections(backends);
|
||||
|
||||
if (MXS_LOG_PRIORITY_IS_ENABLED(LOG_INFO) &&
|
||||
sescmd_list.size())
|
||||
{
|
||||
std::string sescmdstr;
|
||||
|
||||
for (mxs::SessionCommandList::iterator it = sescmd_list.begin();
|
||||
it != sescmd_list.end(); it++)
|
||||
{
|
||||
mxs::SSessionCommand& scmd = *it;
|
||||
sescmdstr += scmd->to_string();
|
||||
sescmdstr += "\n";
|
||||
}
|
||||
|
||||
MXS_INFO("Executed session commands:\n%s", sescmdstr.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
int32_t RWSplitSession::routeQuery(GWBUF* querybuf)
|
||||
{
|
||||
int rval = 0;
|
||||
|
||||
if (query_queue == NULL &&
|
||||
(expected_responses == 0 ||
|
||||
mxs_mysql_get_command(querybuf) == MXS_COM_STMT_FETCH ||
|
||||
m_qc.load_data_state() == QueryClassifier::LOAD_DATA_ACTIVE ||
|
||||
m_qc.large_query()))
|
||||
{
|
||||
/** Gather the information required to make routing decisions */
|
||||
RouteInfo info(this, querybuf);
|
||||
|
||||
/** No active or pending queries */
|
||||
if (route_single_stmt(querybuf, info))
|
||||
{
|
||||
rval = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/**
|
||||
* We are already processing a request from the client. Store the
|
||||
* new query and wait for the previous one to complete.
|
||||
*/
|
||||
ss_dassert(expected_responses || query_queue);
|
||||
MXS_INFO("Storing query (len: %d cmd: %0x), expecting %d replies to current command",
|
||||
gwbuf_length(querybuf), GWBUF_DATA(querybuf)[4], expected_responses);
|
||||
query_queue = gwbuf_append(query_queue, querybuf);
|
||||
querybuf = NULL;
|
||||
rval = 1;
|
||||
ss_dassert(expected_responses > 0);
|
||||
|
||||
if (expected_responses == 0 && !route_stored_query())
|
||||
{
|
||||
rval = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (querybuf != NULL)
|
||||
{
|
||||
gwbuf_free(querybuf);
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
>>>>>>> MXS-1625 Move load data state to QueryClassifier
|
||||
void RWSplit::diagnostics(DCB *dcb)
|
||||
{
|
||||
RWSplit *router = this;
|
||||
|
Reference in New Issue
Block a user