Fix binlogfilter capabilities

The binlogfilter needs to read results one packet at a time but it needs
resultsets to be collected into a single buffer. This behavior is
guaranteed implicitly when the binlogrouter is used but is not present
when it is used without it. To support the use of the binlogfilter with
readconnroute, the filter must properly declare the capabilities.
This commit is contained in:
Markus Mäkelä 2019-12-03 11:06:52 +02:00
parent 5351d43065
commit 52eafb7926
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,7 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE()
MXS_FILTER_VERSION,
desc,
"V1.0.0",
RCAP_TYPE_NONE,
RCAP_TYPE_STMT_OUTPUT,
&BinlogFilter::s_object,
NULL,
NULL,
@ -81,5 +81,5 @@ json_t* BinlogFilter::diagnostics_json() const
// static
uint64_t BinlogFilter::getCapabilities()
{
return RCAP_TYPE_NONE;
return RCAP_TYPE_STMT_OUTPUT;
}

View File

@ -135,6 +135,7 @@ int BinlogFilterSession::routeQuery(GWBUF* pPacket)
// Connected client is using SQL mode
m_state = COMMAND_MODE;
m_reading_checksum = is_master_binlog_checksum(pPacket);
gwbuf_set_type(pPacket, GWBUF_TYPE_COLLECT_RESULT);
break;
default: