MXS-1625 Remove RWS RouteInfo
Now uses the one in QueryClassifier directly.
This commit is contained in:
parent
9be98df41c
commit
1da33c4423
@ -33,7 +33,6 @@
|
||||
#include <maxscale/mysql_utils.h>
|
||||
|
||||
#include "rwsplitsession.hh"
|
||||
#include "routeinfo.hh"
|
||||
|
||||
using namespace maxscale;
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
#pragma once
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
* Use of this software is governed by the Business Source License included
|
||||
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
|
||||
*
|
||||
* Change Date: 2020-01-01
|
||||
*
|
||||
* On the date above, in accordance with the Business Source License, use
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
#include "readwritesplit.hh"
|
||||
#include <maxscale/queryclassifier.hh>
|
||||
|
||||
typedef maxscale::QueryClassifier::RouteInfo RouteInfo;
|
@ -28,8 +28,6 @@
|
||||
#include <maxscale/session_command.hh>
|
||||
#include <maxscale/utils.hh>
|
||||
|
||||
#include "routeinfo.hh"
|
||||
|
||||
using namespace maxscale;
|
||||
|
||||
/**
|
||||
@ -140,16 +138,16 @@ void RWSplitSession::retry_query(GWBUF* querybuf)
|
||||
/**
|
||||
* Routing function. Find out query type, backend type, and target DCB(s).
|
||||
* Then route query to found target(s).
|
||||
* @param inst router instance
|
||||
* @param rses router session
|
||||
* @param querybuf GWBUF including the query
|
||||
*
|
||||
* @return true if routing succeed or if it failed due to unsupported query.
|
||||
* false if backend failure was encountered.
|
||||
*/
|
||||
bool RWSplitSession::route_single_stmt(GWBUF *querybuf, const RouteInfo& info)
|
||||
bool RWSplitSession::route_single_stmt(GWBUF *querybuf)
|
||||
{
|
||||
bool succp = false;
|
||||
|
||||
const QueryClassifier::RouteInfo& info = m_qc.current_route_info();
|
||||
uint32_t stmt_id = info.stmt_id();
|
||||
uint8_t command = info.command();
|
||||
uint32_t qtype = info.type_mask();
|
||||
|
@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
#include "rwsplitsession.hh"
|
||||
#include "routeinfo.hh"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
@ -138,10 +137,10 @@ int32_t RWSplitSession::routeQuery(GWBUF* querybuf)
|
||||
current_target = QueryClassifier::CURRENT_TARGET_SLAVE;
|
||||
}
|
||||
|
||||
RouteInfo info = m_qc.update_route_info(current_target, querybuf);
|
||||
m_qc.update_route_info(current_target, querybuf);
|
||||
|
||||
/** No active or pending queries */
|
||||
if (route_single_stmt(querybuf, info))
|
||||
if (route_single_stmt(querybuf))
|
||||
{
|
||||
rval = 1;
|
||||
}
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "readwritesplit.hh"
|
||||
#include "rwsplit_ps.hh"
|
||||
#include "rwbackend.hh"
|
||||
#include "routeinfo.hh"
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -147,7 +146,7 @@ private:
|
||||
void purge_history(mxs::SSessionCommand& sescmd);
|
||||
|
||||
bool route_session_write(GWBUF *querybuf, uint8_t command, uint32_t type);
|
||||
bool route_single_stmt(GWBUF *querybuf, const RouteInfo& info);
|
||||
bool route_single_stmt(GWBUF *querybuf);
|
||||
bool route_stored_query();
|
||||
|
||||
mxs::SRWBackend get_hinted_backend(char *name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user