diff --git a/examples/roundrobinrouter.cpp b/examples/roundrobinrouter.cpp index 094368e8a..9c366cf51 100644 --- a/examples/roundrobinrouter.cpp +++ b/examples/roundrobinrouter.cpp @@ -607,7 +607,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_ROUTER_VERSION, /* Implemented module API version */ "A simple round robin router", /* Description */ "V1.1.0", /* Module version */ - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT | RCAP_TYPE_RESULTSET_OUTPUT, &entryPoints, /* Defined above */ process_init, /* Process init, can be null */ process_finish, /* Process finish, can be null */ @@ -820,7 +820,7 @@ static uint64_t getCapabilities(MXS_ROUTER *instance) * For output, parsing is not required but counting SQL replies is. RCAP_TYPE_RESULTSET_OUTPUT * should be sufficient. */ - return RCAP_TYPE_CONTIGUOUS_INPUT | RCAP_TYPE_RESULTSET_OUTPUT; + return RCAP_TYPE_NONE; } /** diff --git a/examples/testroute.c b/examples/testroute.c index 5b13799b4..c344917d0 100644 --- a/examples/testroute.c +++ b/examples/testroute.c @@ -152,7 +152,7 @@ diagnostic(MXS_ROUTER *instance, DCB *dcb) static uint64_t getCapabilities(MXS_ROUTER* instance) { - return 0; + return RCAP_TYPE_NONE; } diff --git a/include/maxscale/config.h b/include/maxscale/config.h index ad46cff9a..499cbdd02 100644 --- a/include/maxscale/config.h +++ b/include/maxscale/config.h @@ -294,10 +294,6 @@ void config_enable_feedback_task(void); */ void config_disable_feedback_task(void); - -/** TODO: Add new capability that allows skipping of permission checks */ -bool is_internal_service(const char *router); - /** * @brief Reload the configuration * diff --git a/server/core/config.c b/server/core/config.c index 8beeeca7a..96046704d 100644 --- a/server/core/config.c +++ b/server/core/config.c @@ -72,6 +72,7 @@ #include "maxscale/service.h" #include "maxscale/monitor.h" #include "maxscale/modules.h" +#include "maxscale/router.h" typedef struct duplicate_context { @@ -2012,38 +2013,6 @@ config_truth_value(const char *str) return -1; } -static char *InternalRouters[] = -{ - "debugcli", - "cli", - "maxinfo", - "binlogrouter", - "testroute", - "avrorouter", - NULL -}; - -/** - * Determine if the router is one of the special internal services that - * MaxScale offers. - * - * @param router The router name - * @return Non-zero if the router is in the InternalRouters table - */ -bool is_internal_service(const char *router) -{ - if (router) - { - for (int i = 0; InternalRouters[i]; i++) - { - if (strcmp(router, InternalRouters[i]) == 0) - { - return true; - } - } - } - return false; -} /** * Get the MAC address of first network interface * @@ -2638,7 +2607,7 @@ int create_new_service(CONFIG_CONTEXT *obj) { serviceSetUser(obj->element, user, auth); } - else if (!is_internal_service(router)) + else if (!rcap_type_required(service_get_capabilities(service), RCAP_TYPE_NO_AUTH)) { error_count++; MXS_ERROR("Service '%s' is missing %s%s%s.", diff --git a/server/core/service.c b/server/core/service.c index ac2948582..2d1c49663 100644 --- a/server/core/service.c +++ b/server/core/service.c @@ -142,7 +142,10 @@ SERVICE* service_alloc(const char *name, const char *router) return NULL; } - service->capabilities = 0; + const MXS_MODULE* module = get_module(my_router, MODULE_ROUTER); + ss_dassert(module); + + service->capabilities = module->module_capabilities; service->client_count = 0; service->n_dbref = 0; service->name = my_name; @@ -1239,6 +1242,9 @@ serviceSetFilters(SERVICE *service, char *filters) { if (filter_load(flist[n - 1])) { + const MXS_MODULE* module = get_module(flist[n - 1]->module, MODULE_FILTER); + ss_dassert(module); + capabilities |= module->module_capabilities; capabilities |= flist[n - 1]->obj->getCapabilities(flist[n - 1]->filter); } else diff --git a/server/modules/authenticator/MySQLAuth/dbusers.c b/server/modules/authenticator/MySQLAuth/dbusers.c index 4ed39d91b..1daf1c66b 100644 --- a/server/modules/authenticator/MySQLAuth/dbusers.c +++ b/server/modules/authenticator/MySQLAuth/dbusers.c @@ -627,7 +627,7 @@ static bool check_server_permissions(SERVICE *service, SERVER* server, bool check_service_permissions(SERVICE* service) { - if (is_internal_service(service->routerModule) || + if (rcap_type_required(service_get_capabilities(service), RCAP_TYPE_NO_AUTH) || config_get_global_options()->skip_permission_checks || service->dbref == NULL) // No servers to check { diff --git a/server/modules/filter/cache/cachefilter.cc b/server/modules/filter/cache/cachefilter.cc index 347e18365..b8c6248f7 100644 --- a/server/modules/filter/cache/cachefilter.cc +++ b/server/modules/filter/cache/cachefilter.cc @@ -134,7 +134,7 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "A caching filter that is capable of caching and returning cached data.", VERSION_STRING, - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_TRANSACTION_TRACKING, &CacheFilter::s_object, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -274,7 +274,7 @@ void CacheFilter::diagnostics(DCB* pDcb) uint64_t CacheFilter::getCapabilities() { - return RCAP_TYPE_TRANSACTION_TRACKING; + return RCAP_TYPE_NONE; } // static diff --git a/server/modules/filter/ccrfilter/ccrfilter.c b/server/modules/filter/ccrfilter/ccrfilter.c index e21ffaae8..dc95f18a0 100644 --- a/server/modules/filter/ccrfilter/ccrfilter.c +++ b/server/modules/filter/ccrfilter/ccrfilter.c @@ -134,7 +134,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "A routing hint filter that send queries to the master after data modification", "V1.1.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -389,5 +389,5 @@ diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb) */ static uint64_t getCapabilities(MXS_FILTER* instance) { - return RCAP_TYPE_CONTIGUOUS_INPUT; + return RCAP_TYPE_NONE; } diff --git a/server/modules/filter/dbfwfilter/dbfwfilter.c b/server/modules/filter/dbfwfilter/dbfwfilter.c index a2a757473..73d0eacb7 100644 --- a/server/modules/filter/dbfwfilter/dbfwfilter.c +++ b/server/modules/filter/dbfwfilter/dbfwfilter.c @@ -827,7 +827,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "Firewall Filter", "V1.2.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_STMT_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -2506,5 +2506,5 @@ diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb) */ static uint64_t getCapabilities(MXS_FILTER* instance) { - return RCAP_TYPE_STMT_INPUT; + return RCAP_TYPE_NONE; } diff --git a/server/modules/filter/hintfilter/hintfilter.c b/server/modules/filter/hintfilter/hintfilter.c index 85117d274..9d5685f8b 100644 --- a/server/modules/filter/hintfilter/hintfilter.c +++ b/server/modules/filter/hintfilter/hintfilter.c @@ -67,7 +67,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "A hint parsing filter", "V1.0.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -241,5 +241,5 @@ diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb) */ static uint64_t getCapabilities(MXS_FILTER* instance) { - return RCAP_TYPE_CONTIGUOUS_INPUT; + return RCAP_TYPE_NONE; } diff --git a/server/modules/filter/insertstream/insertstream.c b/server/modules/filter/insertstream/insertstream.c index 116eea630..c93f3910d 100644 --- a/server/modules/filter/insertstream/insertstream.c +++ b/server/modules/filter/insertstream/insertstream.c @@ -110,7 +110,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "Data streaming filter", "1.0.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_TRANSACTION_TRACKING, &MyObject, NULL, NULL, @@ -520,7 +520,7 @@ static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB * */ static uint64_t getCapabilities(MXS_FILTER* instance) { - return RCAP_TYPE_TRANSACTION_TRACKING; + return RCAP_TYPE_NONE; } /** diff --git a/server/modules/filter/luafilter/luafilter.c b/server/modules/filter/luafilter/luafilter.c index d312df0dd..b4a7122ff 100644 --- a/server/modules/filter/luafilter/luafilter.c +++ b/server/modules/filter/luafilter/luafilter.c @@ -98,7 +98,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "Lua Filter", "V1.0.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -671,5 +671,5 @@ static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB * */ static uint64_t getCapabilities(MXS_FILTER *instance) { - return RCAP_TYPE_CONTIGUOUS_INPUT; + return RCAP_TYPE_NONE; } diff --git a/server/modules/filter/masking/maskingfilter.cc b/server/modules/filter/masking/maskingfilter.cc index 3f31fc994..a966bc858 100644 --- a/server/modules/filter/masking/maskingfilter.cc +++ b/server/modules/filter/masking/maskingfilter.cc @@ -78,7 +78,7 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "A masking filter that is capable of masking/obfuscating returned column values.", "V1.0.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_STMT_INPUT | RCAP_TYPE_CONTIGUOUS_OUTPUT, &MaskingFilter::s_object, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -146,7 +146,7 @@ void MaskingFilter::diagnostics(DCB* pDcb) // static uint64_t MaskingFilter::getCapabilities() { - return RCAP_TYPE_STMT_INPUT | RCAP_TYPE_CONTIGUOUS_OUTPUT; + return RCAP_TYPE_NONE; } std::tr1::shared_ptr MaskingFilter::rules() const diff --git a/server/modules/filter/maxrows/maxrows.c b/server/modules/filter/maxrows/maxrows.c index bfb970cca..1240d9eeb 100644 --- a/server/modules/filter/maxrows/maxrows.c +++ b/server/modules/filter/maxrows/maxrows.c @@ -88,7 +88,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "A filter that is capable of limiting the resultset number of rows.", "V1.0.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_STMT_INPUT | RCAP_TYPE_STMT_OUTPUT, &object, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -423,7 +423,7 @@ static void diagnostics(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata, DCB *dc */ static uint64_t getCapabilities(MXS_FILTER* instance) { - return RCAP_TYPE_STMT_INPUT | RCAP_TYPE_STMT_OUTPUT; + return RCAP_TYPE_NONE; } /* API END */ diff --git a/server/modules/filter/mqfilter/mqfilter.c b/server/modules/filter/mqfilter/mqfilter.c index 66e89445e..04b0352eb 100644 --- a/server/modules/filter/mqfilter/mqfilter.c +++ b/server/modules/filter/mqfilter/mqfilter.c @@ -281,7 +281,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "A RabbitMQ query logging filter", "V1.0.2", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -1513,5 +1513,5 @@ diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb) */ static uint64_t getCapabilities(MXS_FILTER* instance) { - return RCAP_TYPE_CONTIGUOUS_INPUT; + return RCAP_TYPE_NONE; } diff --git a/server/modules/filter/namedserverfilter/namedserverfilter.cc b/server/modules/filter/namedserverfilter/namedserverfilter.cc index 1b1e7c26d..05ab53cd9 100644 --- a/server/modules/filter/namedserverfilter/namedserverfilter.cc +++ b/server/modules/filter/namedserverfilter/namedserverfilter.cc @@ -219,7 +219,7 @@ RegexHintFilter::find_servers(char* sql, int sql_len, pcre2_match_data* match_da */ uint64_t RegexHintFilter::getCapabilities() { - return RCAP_TYPE_CONTIGUOUS_INPUT; + return RCAP_TYPE_NONE; } /** @@ -780,7 +780,7 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "A routing hint filter that uses regular expressions to direct queries", "V1.1.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ diff --git a/server/modules/filter/qlafilter/qlafilter.c b/server/modules/filter/qlafilter/qlafilter.c index 83a94613b..d28472c03 100644 --- a/server/modules/filter/qlafilter/qlafilter.c +++ b/server/modules/filter/qlafilter/qlafilter.c @@ -193,7 +193,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "A simple query logging filter", "V1.1.1", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -620,7 +620,7 @@ diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb) */ static uint64_t getCapabilities(MXS_FILTER* instance) { - return RCAP_TYPE_CONTIGUOUS_INPUT; + return RCAP_TYPE_NONE; } /** * Open the log file and print a header if appropriate. diff --git a/server/modules/filter/regexfilter/regexfilter.c b/server/modules/filter/regexfilter/regexfilter.c index ea9225989..f3812faaf 100644 --- a/server/modules/filter/regexfilter/regexfilter.c +++ b/server/modules/filter/regexfilter/regexfilter.c @@ -123,7 +123,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "A query rewrite filter that uses regular expressions to rewrite queries", "V1.1.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -493,5 +493,5 @@ void log_nomatch(REGEX_INSTANCE* inst, char* re, char* old) */ static uint64_t getCapabilities(MXS_FILTER* instance) { - return RCAP_TYPE_CONTIGUOUS_INPUT; + return RCAP_TYPE_NONE; } diff --git a/server/modules/filter/tee/tee.c b/server/modules/filter/tee/tee.c index d4ec88422..713147e1e 100644 --- a/server/modules/filter/tee/tee.c +++ b/server/modules/filter/tee/tee.c @@ -326,7 +326,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "A tee piece in the filter plumbing", "V1.0.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -743,7 +743,7 @@ diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb) */ static uint64_t getCapabilities(MXS_FILTER* instance) { - return RCAP_TYPE_CONTIGUOUS_INPUT; + return RCAP_TYPE_NONE; } /** diff --git a/server/modules/filter/topfilter/topfilter.c b/server/modules/filter/topfilter/topfilter.c index 27d070c91..c5a72a689 100644 --- a/server/modules/filter/topfilter/topfilter.c +++ b/server/modules/filter/topfilter/topfilter.c @@ -157,7 +157,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "A top N query logging filter", "V1.0.1", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -631,5 +631,5 @@ diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb) */ static uint64_t getCapabilities(MXS_FILTER* instance) { - return RCAP_TYPE_CONTIGUOUS_INPUT; + return RCAP_TYPE_NONE; } diff --git a/server/modules/filter/tpmfilter/tpmfilter.c b/server/modules/filter/tpmfilter/tpmfilter.c index 10f757af5..d6dc55a20 100644 --- a/server/modules/filter/tpmfilter/tpmfilter.c +++ b/server/modules/filter/tpmfilter/tpmfilter.c @@ -167,7 +167,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_FILTER_VERSION, "Transaction Performance Monitoring filter", "V1.0.1", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -605,7 +605,7 @@ diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb) */ static uint64_t getCapabilities(MXS_FILTER* instance) { - return RCAP_TYPE_CONTIGUOUS_INPUT; + return RCAP_TYPE_NONE; } static void checkNamedPipe(void *args) diff --git a/server/modules/routing/avrorouter/avro.c b/server/modules/routing/avrorouter/avro.c index 9fed96172..e6ac1b15e 100644 --- a/server/modules/routing/avrorouter/avro.c +++ b/server/modules/routing/avrorouter/avro.c @@ -170,7 +170,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_ROUTER_VERSION, "Binlogrouter", "V1.0.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_NO_RSESSION | RCAP_TYPE_NO_AUTH, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -1019,7 +1019,7 @@ errorReply(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session, GWBUF *mess static uint64_t getCapabilities(MXS_ROUTER* instance) { - return RCAP_TYPE_NO_RSESSION; + return RCAP_TYPE_NONE; } /** diff --git a/server/modules/routing/binlogrouter/blr.c b/server/modules/routing/binlogrouter/blr.c index 9501d1423..7299c46f5 100644 --- a/server/modules/routing/binlogrouter/blr.c +++ b/server/modules/routing/binlogrouter/blr.c @@ -171,7 +171,8 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_ROUTER_VERSION, "Binlogrouter", "V2.1.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_NO_RSESSION | RCAP_TYPE_CONTIGUOUS_OUTPUT | + RCAP_TYPE_RESULTSET_OUTPUT | RCAP_TYPE_NO_AUTH, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -1891,7 +1892,7 @@ static void rses_end_locked_router_action(ROUTER_SLAVE *rses) static uint64_t getCapabilities(MXS_ROUTER* instance) { - return RCAP_TYPE_NO_RSESSION | RCAP_TYPE_CONTIGUOUS_OUTPUT | RCAP_TYPE_RESULTSET_OUTPUT; + return RCAP_TYPE_NONE; } /** diff --git a/server/modules/routing/cli/cli.c b/server/modules/routing/cli/cli.c index 71cb68eb7..b365fee12 100644 --- a/server/modules/routing/cli/cli.c +++ b/server/modules/routing/cli/cli.c @@ -91,7 +91,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_ROUTER_VERSION, "The admin user interface", "V1.0.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_NO_AUTH, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -290,5 +290,5 @@ diagnostics(MXS_ROUTER *instance, DCB *dcb) static uint64_t getCapabilities(MXS_ROUTER *instance) { - return 0; + return RCAP_TYPE_NONE; } diff --git a/server/modules/routing/debugcli/debugcli.c b/server/modules/routing/debugcli/debugcli.c index f51845cbe..073535d2b 100644 --- a/server/modules/routing/debugcli/debugcli.c +++ b/server/modules/routing/debugcli/debugcli.c @@ -90,7 +90,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_ROUTER_VERSION, "The debug user interface", "V1.1.1", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_NO_AUTH, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -295,5 +295,5 @@ diagnostics(MXS_ROUTER *instance, DCB *dcb) static uint64_t getCapabilities(MXS_ROUTER* instance) { - return 0; + return RCAP_TYPE_NONE; } diff --git a/server/modules/routing/hintrouter/hintrouter.cc b/server/modules/routing/hintrouter/hintrouter.cc index b0492339f..7d71c1304 100644 --- a/server/modules/routing/hintrouter/hintrouter.cc +++ b/server/modules/routing/hintrouter/hintrouter.cc @@ -82,7 +82,7 @@ void HintRouter::diagnostics(DCB* pOut) uint64_t HintRouter::getCapabilities() { HR_ENTRY(); - return RCAP_TYPE_STMT_OUTPUT; + return RCAP_TYPE_NONE; } @@ -95,7 +95,7 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE() MXS_ROUTER_VERSION, /* Implemented module API version */ "A hint router", /* Description */ "V1.0.0", /* Module version */ - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_STMT_OUTPUT, &HintRouter::s_object, NULL, /* Process init, can be null */ NULL, /* Process finish, can be null */ diff --git a/server/modules/routing/maxinfo/maxinfo.c b/server/modules/routing/maxinfo/maxinfo.c index f0719e69f..08b191896 100644 --- a/server/modules/routing/maxinfo/maxinfo.c +++ b/server/modules/routing/maxinfo/maxinfo.c @@ -116,7 +116,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_ROUTER_VERSION, "The MaxScale Information Schema", "V1.0.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_NO_AUTH, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -382,7 +382,7 @@ diagnostics(MXS_ROUTER *instance, DCB *dcb) static uint64_t getCapabilities(MXS_ROUTER* instance) { - return 0; + return RCAP_TYPE_NONE; } diff --git a/server/modules/routing/readwritesplit/readwritesplit.c b/server/modules/routing/readwritesplit/readwritesplit.c index 3e549b223..839e1e555 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.c +++ b/server/modules/routing/readwritesplit/readwritesplit.c @@ -161,7 +161,7 @@ MXS_MODULE *MXS_CREATE_MODULE() MXS_MODULE_API_ROUTER, MXS_MODULE_GA, MXS_ROUTER_VERSION, "A Read/Write splitting router for enhancement read scalability", "V1.1.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_STMT_INPUT | RCAP_TYPE_TRANSACTION_TRACKING, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -821,7 +821,7 @@ static void clientReply(MXS_ROUTER *instance, */ static uint64_t getCapabilities(MXS_ROUTER* instance) { - return RCAP_TYPE_STMT_INPUT | RCAP_TYPE_TRANSACTION_TRACKING; + return RCAP_TYPE_NONE; } /* diff --git a/server/modules/routing/schemarouter/schemarouter.c b/server/modules/routing/schemarouter/schemarouter.c index 6cdeeec35..9a4e4bd3c 100644 --- a/server/modules/routing/schemarouter/schemarouter.c +++ b/server/modules/routing/schemarouter/schemarouter.c @@ -618,7 +618,7 @@ MXS_MODULE* MXS_CREATE_MODULE() MXS_ROUTER_VERSION, "A database sharding router for simple sharding", "V1.0.0", - MXS_NO_MODULE_CAPABILITIES, + RCAP_TYPE_CONTIGUOUS_INPUT, &MyObject, NULL, /* Process init. */ NULL, /* Process finish. */ @@ -3099,7 +3099,7 @@ static rses_property_t* mysql_sescmd_get_property(mysql_sescmd_t* scmd) */ static uint64_t getCapabilities(MXS_ROUTER* instance) { - return RCAP_TYPE_CONTIGUOUS_INPUT; + return RCAP_TYPE_NONE; } /**