MXS-1625 Move tmp table state variable to mxs::QueryClassifier
This commit is contained in:
@ -23,6 +23,7 @@ QueryClassifier::QueryClassifier(MXS_SESSION* pSession,
|
||||
: m_pSession(pSession)
|
||||
, m_use_sql_variables_in(use_sql_variables_in)
|
||||
, m_load_data_state(LOAD_DATA_INACTIVE)
|
||||
, m_have_tmp_tables(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ void check_create_tmp_table(RWSplitSession *router_cli_ses,
|
||||
ss_dassert(router_cli_ses && querybuf && router_cli_ses->m_client &&
|
||||
router_cli_ses->m_client->data);
|
||||
|
||||
router_cli_ses->m_have_tmp_tables = true;
|
||||
router_cli_ses->qc().set_have_tmp_tables(true);
|
||||
char* tblname = qc_get_created_table_name(querybuf);
|
||||
std::string table;
|
||||
|
||||
@ -505,7 +505,7 @@ handle_multi_temp_and_load(RWSplitSession *rses, GWBUF *querybuf,
|
||||
/**
|
||||
* Check if the query has anything to do with temporary tables.
|
||||
*/
|
||||
if (rses->m_have_tmp_tables && is_packet_a_query(packet_type))
|
||||
if (rses->qc().have_tmp_tables() && is_packet_a_query(packet_type))
|
||||
{
|
||||
check_drop_tmp_table(rses, querybuf);
|
||||
if (is_read_tmp_table(rses, querybuf, *qtype))
|
||||
|
@ -779,8 +779,8 @@ void RWSplitSession::replace_master(SRWBackend& target)
|
||||
m_current_master = target;
|
||||
|
||||
// As the master has changed, we can reset the temporary table information
|
||||
m_have_tmp_tables = false;
|
||||
m_temp_tables.clear();
|
||||
m_qc.set_have_tmp_tables(false);
|
||||
temp_tables.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,7 +27,6 @@ RWSplitSession::RWSplitSession(RWSplit* instance, MXS_SESSION* session,
|
||||
m_large_query(false),
|
||||
m_config(instance->config()),
|
||||
m_nbackends(instance->service()->n_dbref),
|
||||
m_have_tmp_tables(false),
|
||||
m_load_data_sent(0),
|
||||
m_client(session->client_dcb),
|
||||
m_sescmd_count(1), // Needs to be a positive number to work
|
||||
|
@ -107,7 +107,6 @@ public:
|
||||
bool m_large_query; /**< Set to true when processing payloads >= 2^24 bytes */
|
||||
Config m_config; /**< copied config info from router instance */
|
||||
int m_nbackends; /**< Number of backend servers (obsolete) */
|
||||
bool m_have_tmp_tables; /**< True if temp tables have been created */
|
||||
uint64_t m_load_data_sent; /**< How much data has been sent */
|
||||
DCB* m_client; /**< The client DCB */
|
||||
uint64_t m_sescmd_count; /**< Number of executed session commands */
|
||||
|
Reference in New Issue
Block a user