The readwritesplit transaction management was a large part of the
clientReply function. Moving it into a separate function clarifies the
clientReply function by hiding the comments and details of the transaction
management.
The schemarouter now uses the RWBackend to track the response states. This
fixes the debug assertions that happened with the mxs1113_schemarouter_ps
test.
By splitting the processing and state querying into two separate
functions, the result can be inspected multiple times without triggering
the result processing.
Removed unused code, ordered function definitions that declarations aren't
needed, changed functions to pass pointers to the event body instead of
the start of the protocol packet.
The test now checks that default database usage works as expected. This
currently only works with RBR and with SBR it fails due to inadequate
processing of the SQL statements (default database is not concatenated
into the table).
Added `match` and `exclude` functionality. This allows versatile filtering
without a large investment of development time by leveraging the benefits
of PCRE2 regular expressions.
Also cleaned up the filter and removed the single table matching and
active parameter that were obsoleted by the regular expression parameters.
This column will be used to store the relative path of the file
where a particular event can be found.
Unless the path is stored, BLR will not be able to find an event based
on the gtid if BRL is connected to a node in a Galera cluster and updates
are made to nodes other than that node as in that case, the GTID domain id
and server id, will not identify the correct directory.
The full path is not stored in the column binlog_file as the path
would in that case (without other modifications) be visible to the
client.
If
* BLR replicates from a node in a Galera cluster and
* writes are made to all nodes in that cluster,
then
* if a slave to BLR is stopped when it has received an event
originating in a node different than the one BLR is replicating
from
the subsequent (re)starting of the slave will fail because BLR looks
for the last event from a file whose path contains the server id of
the node where the event originates, although it should look for it
in the file whose path contains the server id of the node from which
BLR replicates.
The test adds events to the backends, causing them to go out of sync. It then
uses the reset-replication command to fix the situation and checks replication
is working.
The test adds a scheduled server event, the does failover, rejoin and
switchover and checks that event is manipulated correctly. Also includes
a change to the monitor to fix an invalid ALTER EVENT query when the event
definer has wildcard host.
The collection of resultsets needs to be disabled by default when a
response is received to cover the cases where an error is returned.
The collection of results should also not be set for queries that do not
generate any responses.
When the 10.2 users query is executed with a MariaDB server older than
10.2.11, the query will fail due to inadequate grants on the 'users' table
generated as a part of the CTE. To work around the issue, a SELECT grant
on the whole mysql database is required. Logging the server where the
query fails also helps resolve the problem by pointing out where the grant
needs to be added.
Removed unnecessary sections and updated some of the text to be more
specific. Expanded the explanations on where the replication starts and
how the avrorouter needs to be configured. Added example output from the
cdc.py client and removed the relatively useless maxavrocheck section.
Now logs messages explaining what has been done. Scheduled events are
disabled/enabled during the operation. Redirection of slaves is done at
the end similar to failover/switchover.