This type will be used for storing the configuration
specified with CHANGE MASTER at a point where it has been
verified, to the extent possible, that the provided options
are valid.
In order to make it visible that the types contain C++
members, the following types were renamed:
CHANGE_MASTER_OPTIONS -> ChangeMasterOptions
MASTER_SERVER_CNF -> MasterServerConfig
Functions where also changed to take const refs were appropriate.
In order support the possiblity for having multiple alternative
masters for the binlog server, we need to have multiple configs
around.
Originally the config values were stored as 'char *':s, which
would have made the lifetime management of the strings laborious
and error prone.
Now, the options are stored as std::string:s, which makes the
lifetime management a non-issue.
When receiving a command, such as
CHANGE MASTER TO MASTER_HOST = '127.0.0.1' ...
when the value is extracted, the quotes are removed before the value
is returned.
Firstly, BLR does not anyway anywhere enforce that quotes are present
where they should be and, secondly, BLR currently does de-quoting all
over the place and with this change, all those places can be simplified.
By removing the constness of the type for the actual stored value, the
return values of the access operators are defined by the type itself. This
allows both const and non-const types to be stored in a rworker_local
object.
The configuration updating in readwritesplit was the inspiration for the
mxs::rworker_local type. Due to this, taking it into use simply means that
the type changes from Config to mxs::rworker_local<Config>.
Given that worker.hh was public, it made sense to make routingworker.hh
public as well. This removes the need to include private headers in
modules and allows C++ constructs to be used in C++ code when previously
only the C API was available.
The mxs::rworker_local<T> is a convenience type that provides fast read
access with thread-safe updates. It is intended to be used with data that
is read often but updated rarely e.g. configuration data for routers.
NamedServerFilter now uses struct sockaddr_in6 to store the source
parameter. If ipv4 addresses are used they are mapped to ipv6 struct,
this allows the usage of both ipv4 and ipv6.
This commit also includes some small refactoring and removing some code
that was not needed anymore.
Since the servers are not modified before or during the wait, the waiting
can be done in the preparation method. This simplifies the actual failover
somewhat, and allows the monitor to keep running normally while waiting for
the log to clear.
By storing the data gathere by readwritesplit inside the session, the
protocol will be aware of the state of the LOAD DATA LOCAL INFILE
execution. This prevents misinterpretation of the data which previously
led to closed connections, effectively rendering LOAD DATA LOCAL INFILE
unusable.
This change is a temporary solution to a problem that needs to be solved
at the protocol level. The changes required to implement this are too big
to add into a bug fix release.
Explicitly state that servers only require `ssl_ca_cert` and that
`ssl_cert` and `ssl_key` are optional in certain cases. Updated the
wording of all parameters and removed obsolete or false documentation.
No longer depends on monitor events as the other operations do not
either. The active_event/new_event detection was removed, as these
only protect against a rare situation. A similar feature which
protects all the cluster modifications will be implemented later.
The master reconnection in the binlogrouter used the housekeeper
recursively. This is no longer supported and the delayed worker call
mechanism should be used in its stead.