MXS-2068: Move RWBackend into mysqlcommon
This cleanly allows multiple modules to use it.
This commit is contained in:
@ -12,13 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "response_stat.hh"
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <maxscale/backend.hh>
|
#include <maxscale/backend.hh>
|
||||||
#include <maxscale/modutil.h>
|
#include <maxscale/modutil.h>
|
||||||
|
#include <maxscale/response_stat.hh>
|
||||||
|
|
||||||
namespace maxscale
|
namespace maxscale
|
||||||
{
|
{
|
@ -33,8 +33,9 @@ add_library(maxscale-common SHARED
|
|||||||
queryclassifier.cc
|
queryclassifier.cc
|
||||||
query_classifier.cc
|
query_classifier.cc
|
||||||
random.cc
|
random.cc
|
||||||
resultset.cc
|
|
||||||
resource.cc
|
resource.cc
|
||||||
|
response_stat.cc
|
||||||
|
resultset.cc
|
||||||
router.cc
|
router.cc
|
||||||
routingworker.cc
|
routingworker.cc
|
||||||
secrets.cc
|
secrets.cc
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* of this software will be governed by version 2 or later of the General
|
* of this software will be governed by version 2 or later of the General
|
||||||
* Public License.
|
* Public License.
|
||||||
*/
|
*/
|
||||||
#include "response_stat.hh"
|
#include <maxscale/response_stat.hh>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
add_library(mysqlcommon SHARED mysql_common.cc mariadb_client.cc)
|
add_library(mysqlcommon SHARED mysql_common.cc mariadb_client.cc rwbackend.cc)
|
||||||
target_link_libraries(mysqlcommon maxscale-common)
|
target_link_libraries(mysqlcommon maxscale-common)
|
||||||
set_target_properties(mysqlcommon PROPERTIES VERSION "2.0.0")
|
set_target_properties(mysqlcommon PROPERTIES VERSION "2.0.0")
|
||||||
install_module(mysqlcommon core)
|
install_module(mysqlcommon core)
|
||||||
|
@ -1,4 +1,17 @@
|
|||||||
#include "rwbackend.hh"
|
/*
|
||||||
|
* 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: 2022-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 <maxscale/protocol/rwbackend.hh>
|
||||||
|
|
||||||
#include <maxscale/modutil.h>
|
#include <maxscale/modutil.h>
|
||||||
#include <maxscale/protocol/mysql.h>
|
#include <maxscale/protocol/mysql.h>
|
@ -1,4 +1,4 @@
|
|||||||
add_library(cat SHARED cat.cc catsession.cc ../readwritesplit/rwbackend.cc ../readwritesplit/response_stat.cc)
|
add_library(cat SHARED cat.cc catsession.cc)
|
||||||
target_link_libraries(cat maxscale-common mysqlcommon)
|
target_link_libraries(cat maxscale-common mysqlcommon)
|
||||||
set_target_properties(cat PROPERTIES VERSION "1.0.0" LINK_FLAGS -Wl,-z,defs)
|
set_target_properties(cat PROPERTIES VERSION "1.0.0" LINK_FLAGS -Wl,-z,defs)
|
||||||
install_module(cat experimental)
|
install_module(cat experimental)
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "cat.hh"
|
#include "cat.hh"
|
||||||
|
|
||||||
#include "../readwritesplit/rwbackend.hh"
|
#include <maxscale/protocol/rwbackend.hh>
|
||||||
|
|
||||||
class Cat;
|
class Cat;
|
||||||
|
|
||||||
|
@ -5,8 +5,6 @@ rwsplit_mysql.cc
|
|||||||
rwsplit_route_stmt.cc
|
rwsplit_route_stmt.cc
|
||||||
rwsplit_select_backends.cc
|
rwsplit_select_backends.cc
|
||||||
rwsplit_session_cmd.cc
|
rwsplit_session_cmd.cc
|
||||||
rwbackend.cc
|
|
||||||
response_stat.cc
|
|
||||||
)
|
)
|
||||||
target_link_libraries(readwritesplit maxscale-common mysqlcommon)
|
target_link_libraries(readwritesplit maxscale-common mysqlcommon)
|
||||||
set_target_properties(readwritesplit PROPERTIES VERSION "1.0.2" LINK_FLAGS -Wl,-z,defs)
|
set_target_properties(readwritesplit PROPERTIES VERSION "1.0.2" LINK_FLAGS -Wl,-z,defs)
|
||||||
|
@ -35,8 +35,7 @@
|
|||||||
#include <maxscale/session_command.hh>
|
#include <maxscale/session_command.hh>
|
||||||
#include <maxscale/protocol/mysql.h>
|
#include <maxscale/protocol/mysql.h>
|
||||||
#include <maxscale/routingworker.hh>
|
#include <maxscale/routingworker.hh>
|
||||||
|
#include <maxscale/protocol/rwbackend.hh>
|
||||||
#include "rwbackend.hh"
|
|
||||||
|
|
||||||
enum backend_type_t
|
enum backend_type_t
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "readwritesplit.hh"
|
#include "readwritesplit.hh"
|
||||||
#include "rwbackend.hh"
|
|
||||||
#include "trx.hh"
|
#include "trx.hh"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -21,6 +20,7 @@
|
|||||||
#include <maxscale/buffer.hh>
|
#include <maxscale/buffer.hh>
|
||||||
#include <maxscale/modutil.h>
|
#include <maxscale/modutil.h>
|
||||||
#include <maxscale/queryclassifier.hh>
|
#include <maxscale/queryclassifier.hh>
|
||||||
|
#include <maxscale/protocol/rwbackend.hh>
|
||||||
|
|
||||||
#define TARGET_IS_MASTER(t) maxscale::QueryClassifier::target_is_master(t)
|
#define TARGET_IS_MASTER(t) maxscale::QueryClassifier::target_is_master(t)
|
||||||
#define TARGET_IS_SLAVE(t) maxscale::QueryClassifier::target_is_slave(t)
|
#define TARGET_IS_SLAVE(t) maxscale::QueryClassifier::target_is_slave(t)
|
||||||
|
Reference in New Issue
Block a user