Merge branch 'develop' into MAX-11
Conflicts: server/include/server.h server/modules/monitor/mysql_mon.c server/modules/protocol/mysql_client.c server/modules/routing/readwritesplit/readwritesplit.c utils/skygw_debug.h
This commit is contained in:
@ -35,6 +35,7 @@
|
||||
#include <session.h>
|
||||
#include <router.h>
|
||||
#include <modules.h>
|
||||
#include <modinfo.h>
|
||||
#include <atomic.h>
|
||||
#include <spinlock.h>
|
||||
#include <dcb.h>
|
||||
@ -43,6 +44,14 @@
|
||||
#include <skygw_utils.h>
|
||||
#include <log_manager.h>
|
||||
|
||||
|
||||
MODULE_INFO info = {
|
||||
MODULE_API_ROUTER,
|
||||
MODULE_ALPHA_RELEASE,
|
||||
ROUTER_VERSION,
|
||||
"The debug user interface"
|
||||
};
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
static char *version_str = "V1.1.1";
|
||||
|
@ -40,6 +40,7 @@
|
||||
* 20/05/14 Mark Riddoch Added ability to give server and service names rather
|
||||
* than simply addresses
|
||||
* 23/05/14 Mark Riddoch Added support for developer and user modes
|
||||
* 29/05/14 Mark Riddoch Add Filter support
|
||||
*
|
||||
* @endverbatim
|
||||
*/
|
||||
@ -50,6 +51,7 @@
|
||||
#include <service.h>
|
||||
#include <session.h>
|
||||
#include <router.h>
|
||||
#include <filter.h>
|
||||
#include <modules.h>
|
||||
#include <atomic.h>
|
||||
#include <server.h>
|
||||
@ -77,6 +79,7 @@
|
||||
#define ARG_TYPE_SESSION 6
|
||||
#define ARG_TYPE_DCB 7
|
||||
#define ARG_TYPE_MONITOR 8
|
||||
#define ARG_TYPE_FILTER 9
|
||||
|
||||
/**
|
||||
* The subcommand structure
|
||||
@ -113,6 +116,14 @@ struct subcommand showoptions[] = {
|
||||
"Show the poll statistics",
|
||||
"Show the poll statistics",
|
||||
{0, 0, 0} },
|
||||
{ "filter", 0, dprintFilter,
|
||||
"Show details of a filter, called with a filter name",
|
||||
"Show details of a filter, called with the address of a filter",
|
||||
{ARG_TYPE_FILTER, 0, 0} },
|
||||
{ "filters", 0, dprintAllFilters,
|
||||
"Show all filters",
|
||||
"Show all filters",
|
||||
{0, 0, 0} },
|
||||
{ "modules", 0, dprintAllModules,
|
||||
"Show all currently loaded modules",
|
||||
"Show all currently loaded modules",
|
||||
@ -157,6 +168,10 @@ struct subcommand showoptions[] = {
|
||||
* The subcommands of the list command
|
||||
*/
|
||||
struct subcommand listoptions[] = {
|
||||
{ "filters", 0, dListFilters,
|
||||
"List all the filters defined within MaxScale",
|
||||
"List all the filters defined within MaxScale",
|
||||
{0, 0, 0} },
|
||||
{ "listeners", 0, dListListeners,
|
||||
"List all the listeners defined within MaxScale",
|
||||
"List all the listeners defined within MaxScale",
|
||||
@ -493,6 +508,10 @@ SERVICE *service;
|
||||
if (mode == CLIM_USER || (rval = (unsigned long)strtol(arg, NULL, 0)) == 0)
|
||||
rval = (unsigned long)monitor_find(arg);
|
||||
return rval;
|
||||
case ARG_TYPE_FILTER:
|
||||
if (mode == CLIM_USER || (rval = (unsigned long)strtol(arg, NULL, 0)) == 0)
|
||||
rval = (unsigned long)filter_find(arg);
|
||||
return rval;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -516,7 +535,7 @@ execute_cmd(CLI_SESSION *cli)
|
||||
{
|
||||
DCB *dcb = cli->session->client;
|
||||
int argc, i, j, found = 0;
|
||||
char *args[MAXARGS];
|
||||
char *args[MAXARGS + 1];
|
||||
unsigned long arg1, arg2, arg3;
|
||||
int in_quotes = 0, escape_next = 0;
|
||||
char *ptr, *lptr;
|
||||
@ -754,11 +773,13 @@ static struct {
|
||||
char *str;
|
||||
unsigned int bit;
|
||||
} ServerBits[] = {
|
||||
{ "running", SERVER_RUNNING },
|
||||
{ "master", SERVER_MASTER },
|
||||
{ "slave", SERVER_SLAVE },
|
||||
{ "synced", SERVER_JOINED },
|
||||
{ NULL, 0 }
|
||||
{ "running", SERVER_RUNNING },
|
||||
{ "master", SERVER_MASTER },
|
||||
{ "slave", SERVER_SLAVE },
|
||||
{ "synced", SERVER_JOINED },
|
||||
{ "maintenance", SERVER_MAINT },
|
||||
{ "maint", SERVER_MAINT },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
/**
|
||||
* Map the server status bit
|
||||
|
@ -79,6 +79,7 @@
|
||||
#include <readconnection.h>
|
||||
#include <dcb.h>
|
||||
#include <spinlock.h>
|
||||
#include <modinfo.h>
|
||||
|
||||
#include <skygw_types.h>
|
||||
#include <skygw_utils.h>
|
||||
@ -88,6 +89,13 @@
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
MODULE_INFO info = {
|
||||
MODULE_API_ROUTER,
|
||||
MODULE_ALPHA_RELEASE,
|
||||
ROUTER_VERSION,
|
||||
"A connection based router to load balance based on connections"
|
||||
};
|
||||
|
||||
static char *version_str = "V1.0.2";
|
||||
|
||||
/* The router entry points */
|
||||
@ -345,6 +353,9 @@ int master_host = -1;
|
||||
inst->bitmask)));
|
||||
}
|
||||
|
||||
if (SERVER_IN_MAINT(inst->servers[i]->server))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* If router_options=slave, get the running master
|
||||
* It will be used if there are no running slaves at all
|
||||
|
@ -30,10 +30,19 @@
|
||||
#include <query_classifier.h>
|
||||
#include <dcb.h>
|
||||
#include <spinlock.h>
|
||||
#include <modinfo.h>
|
||||
|
||||
MODULE_INFO info = {
|
||||
MODULE_API_ROUTER,
|
||||
MODULE_ALPHA_RELEASE,
|
||||
ROUTER_VERSION,
|
||||
"A Read/Write splitting router for enhancement read scalability"
|
||||
};
|
||||
#if defined(SS_DEBUG)
|
||||
# include <mysql_client_server_protocol.h>
|
||||
#endif
|
||||
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
/**
|
||||
@ -829,8 +838,7 @@ static bool get_dcb(
|
||||
BACKEND* b = backend_ref[i].bref_backend;
|
||||
|
||||
if (backend_ref[i].bref_state == BREF_IN_USE &&
|
||||
(SERVER_IS_MASTER(b->backend_server) ||
|
||||
SERVER_IS_JOINED(b->backend_server)))
|
||||
(SERVER_IS_MASTER(b->backend_server)))
|
||||
{
|
||||
*p_dcb = backend_ref[i].bref_dcb;
|
||||
succp = true;
|
||||
@ -1544,8 +1552,7 @@ static bool select_connect_backend_servers(
|
||||
}
|
||||
}
|
||||
else if (!master_connected &&
|
||||
(SERVER_IS_MASTER(b->backend_server) ||
|
||||
SERVER_IS_JOINED(b->backend_server)))
|
||||
(SERVER_IS_MASTER(b->backend_server)))
|
||||
{
|
||||
master_found = true;
|
||||
|
||||
@ -1659,8 +1666,7 @@ static bool select_connect_backend_servers(
|
||||
"Selected %s in \t%s:%d",
|
||||
(btype == BE_MASTER ? "master" :
|
||||
(btype == BE_SLAVE ? "slave" :
|
||||
(btype == BE_JOINED ? "galera node" :
|
||||
"unknown node type"))),
|
||||
"unknown node type")),
|
||||
b->backend_server->name,
|
||||
b->backend_server->port)));
|
||||
}
|
||||
|
@ -17,9 +17,17 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <router.h>
|
||||
#include <modinfo.h>
|
||||
|
||||
static char *version_str = "V1.0.0";
|
||||
|
||||
MODULE_INFO info = {
|
||||
MODULE_API_ROUTER,
|
||||
MODULE_IN_DEVELOPMENT,
|
||||
ROUTER_VERSION,
|
||||
"A test router - not for use in real systems"
|
||||
};
|
||||
|
||||
static ROUTER *createInstance(SERVICE *service, char **options);
|
||||
static void *newSession(ROUTER *instance, SESSION *session);
|
||||
static void closeSession(ROUTER *instance, void *session);
|
||||
@ -145,4 +153,4 @@ static uint8_t getCapabilities(
|
||||
void* router_session)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user