MXS-2486: Add missing schemarouter capabilities
The capabilities that the schemarouter declared were missing the RCAP_TYPE_PACKET_OUTPUT which caused partial packets to be returned to it.
This commit is contained in:
@ -294,6 +294,7 @@ void RWBackend::process_packets(GWBUF* result)
|
|||||||
auto it = buffer.begin();
|
auto it = buffer.begin();
|
||||||
MXB_AT_DEBUG(size_t total_len = buffer.length());
|
MXB_AT_DEBUG(size_t total_len = buffer.length());
|
||||||
MXB_AT_DEBUG(size_t used_len = 0);
|
MXB_AT_DEBUG(size_t used_len = 0);
|
||||||
|
mxb_assert(dcb()->session->service->capabilities & (RCAP_TYPE_PACKET_OUTPUT | RCAP_TYPE_STMT_OUTPUT));
|
||||||
|
|
||||||
while (it != buffer.end())
|
while (it != buffer.end())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -265,9 +265,12 @@ json_t* SchemaRouter::diagnostics_json() const
|
|||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const uint64_t CAPABILITIES = RCAP_TYPE_CONTIGUOUS_INPUT | RCAP_TYPE_PACKET_OUTPUT
|
||||||
|
| RCAP_TYPE_RUNTIME_CONFIG;
|
||||||
|
|
||||||
uint64_t SchemaRouter::getCapabilities()
|
uint64_t SchemaRouter::getCapabilities()
|
||||||
{
|
{
|
||||||
return RCAP_TYPE_CONTIGUOUS_INPUT | RCAP_TYPE_RUNTIME_CONFIG;
|
return schemarouter::CAPABILITIES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,21 +291,21 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE()
|
|||||||
MXS_ROUTER_VERSION,
|
MXS_ROUTER_VERSION,
|
||||||
"A database sharding router for simple sharding",
|
"A database sharding router for simple sharding",
|
||||||
"V1.0.0",
|
"V1.0.0",
|
||||||
RCAP_TYPE_CONTIGUOUS_INPUT | RCAP_TYPE_RUNTIME_CONFIG,
|
schemarouter::CAPABILITIES,
|
||||||
&schemarouter::SchemaRouter::s_object,
|
&schemarouter::SchemaRouter::s_object,
|
||||||
NULL, /* Process init. */
|
NULL,
|
||||||
NULL, /* Process finish. */
|
NULL,
|
||||||
NULL, /* Thread init. */
|
NULL,
|
||||||
NULL, /* Thread finish. */
|
NULL,
|
||||||
{
|
{
|
||||||
{"ignore_databases", MXS_MODULE_PARAM_STRING },
|
{"ignore_databases", MXS_MODULE_PARAM_STRING },
|
||||||
{"ignore_databases_regex", MXS_MODULE_PARAM_STRING },
|
{"ignore_databases_regex", MXS_MODULE_PARAM_STRING },
|
||||||
{"max_sescmd_history", MXS_MODULE_PARAM_COUNT, "0"},
|
{"max_sescmd_history", MXS_MODULE_PARAM_COUNT, "0"},
|
||||||
{"disable_sescmd_history", MXS_MODULE_PARAM_BOOL, "false"},
|
{"disable_sescmd_history", MXS_MODULE_PARAM_BOOL, "false"},
|
||||||
{"refresh_databases", MXS_MODULE_PARAM_BOOL, "true"},
|
{"refresh_databases", MXS_MODULE_PARAM_BOOL, "true"},
|
||||||
{"refresh_interval", MXS_MODULE_PARAM_COUNT, DEFAULT_REFRESH_INTERVAL},
|
{"refresh_interval", MXS_MODULE_PARAM_COUNT, DEFAULT_REFRESH_INTERVAL},
|
||||||
{"debug", MXS_MODULE_PARAM_BOOL, "false"},
|
{"debug", MXS_MODULE_PARAM_BOOL, "false"},
|
||||||
{"preferred_server", MXS_MODULE_PARAM_SERVER },
|
{"preferred_server", MXS_MODULE_PARAM_SERVER },
|
||||||
{MXS_END_MODULE_PARAMS}
|
{MXS_END_MODULE_PARAMS}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user