MXS-1625 Move tmp table management to QueryClassifier
Eventually only managed by QueryClassifier.
This commit is contained in:
@ -242,7 +242,7 @@ void check_create_tmp_table(RWSplitSession *router_cli_ses,
|
||||
}
|
||||
|
||||
/** Add the table to the set of temporary tables */
|
||||
router_cli_ses->m_temp_tables.insert(table);
|
||||
router_cli_ses->qc().add_tmp_table(table);
|
||||
|
||||
MXS_FREE(tblname);
|
||||
}
|
||||
@ -253,7 +253,7 @@ void check_create_tmp_table(RWSplitSession *router_cli_ses,
|
||||
*/
|
||||
bool find_table(RWSplitSession* rses, const std::string& table)
|
||||
{
|
||||
if (rses->m_temp_tables.find(table) != rses->m_temp_tables.end())
|
||||
if (rses->qc().is_tmp_table(table))
|
||||
{
|
||||
MXS_INFO("Query targets a temporary table: %s", table.c_str());
|
||||
return false;
|
||||
@ -335,7 +335,7 @@ bool is_read_tmp_table(RWSplitSession *rses,
|
||||
*/
|
||||
bool delete_table(RWSplitSession *rses, const std::string& table)
|
||||
{
|
||||
rses->m_temp_tables.erase(table);
|
||||
rses->qc().remove_tmp_table(table);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -780,7 +780,7 @@ void RWSplitSession::replace_master(SRWBackend& target)
|
||||
|
||||
// As the master has changed, we can reset the temporary table information
|
||||
m_qc.set_have_tmp_tables(false);
|
||||
m_temp_tables.clear();
|
||||
m_qc.clear_tmp_tables();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -111,7 +111,6 @@ public:
|
||||
int m_expected_responses; /**< Number of expected responses to the current query */
|
||||
GWBUF* m_query_queue; /**< Queued commands waiting to be executed */
|
||||
RWSplit* m_router; /**< The router instance */
|
||||
TableSet m_temp_tables; /**< Set of temporary tables */
|
||||
mxs::SessionCommandList m_sescmd_list; /**< List of executed session commands */
|
||||
ResponseMap m_sescmd_responses; /**< Response to each session command */
|
||||
SlaveResponseList m_slave_responses; /**< Slaves that replied before the master */
|
||||
|
Reference in New Issue
Block a user