MXS-1625 Use PSManager of QueryClassifier

This commit is contained in:
Johan Wikman
2018-04-04 16:44:57 +03:00
parent dbce77f9ee
commit 25386c4381
3 changed files with 3 additions and 4 deletions

View File

@ -611,12 +611,12 @@ route_target_t get_target_type(RWSplitSession *rses, GWBUF *buffer,
qc_get_operation(buffer) == QUERY_OP_EXECUTE) qc_get_operation(buffer) == QUERY_OP_EXECUTE)
{ {
std::string id = get_text_ps_id(buffer); std::string id = get_text_ps_id(buffer);
*type = rses->m_ps_manager.get_type(id); *type = rses->qc().ps_get_type(id);
} }
else if (mxs_mysql_is_ps_command(*command)) else if (mxs_mysql_is_ps_command(*command))
{ {
*stmt_id = get_internal_ps_id(rses, buffer); *stmt_id = get_internal_ps_id(rses, buffer);
*type = rses->m_ps_manager.get_type(*stmt_id); *type = rses->qc().ps_get_type(*stmt_id);
} }
route_target = get_route_target(rses->qc(), *command, *type, buffer->hint); route_target = get_route_target(rses->qc(), *command, *type, buffer->hint);

View File

@ -325,7 +325,7 @@ bool RWSplitSession::route_session_write(GWBUF *querybuf, uint8_t command, uint3
qc_query_is_type(type, QUERY_TYPE_PREPARE_STMT)) qc_query_is_type(type, QUERY_TYPE_PREPARE_STMT))
{ {
gwbuf_set_type(querybuf, GWBUF_TYPE_COLLECT_RESULT); gwbuf_set_type(querybuf, GWBUF_TYPE_COLLECT_RESULT);
m_ps_manager.store(querybuf, id); m_qc.ps_store(querybuf, id);
} }
MXS_INFO("Session write, routing to all servers."); MXS_INFO("Session write, routing to all servers.");

View File

@ -118,7 +118,6 @@ public:
SlaveResponseList m_slave_responses; /**< Slaves that replied before the master */ SlaveResponseList m_slave_responses; /**< Slaves that replied before the master */
uint64_t m_sent_sescmd; /**< ID of the last sent session command*/ uint64_t m_sent_sescmd; /**< ID of the last sent session command*/
uint64_t m_recv_sescmd; /**< ID of the most recently completed session command */ uint64_t m_recv_sescmd; /**< ID of the most recently completed session command */
PSManager m_ps_manager; /**< Prepared statement manager*/
ClientHandleMap m_ps_handles; /**< Client PS handle to internal ID mapping */ ClientHandleMap m_ps_handles; /**< Client PS handle to internal ID mapping */
ExecMap m_exec_map; /**< Map of COM_STMT_EXECUTE statement IDs to Backends */ ExecMap m_exec_map; /**< Map of COM_STMT_EXECUTE statement IDs to Backends */
std::string m_gtid_pos; /**< Gtid position for causal read */ std::string m_gtid_pos; /**< Gtid position for causal read */