The test uses standard setup (1xMaster, 3xSlaves).
1. Shutdown master (server 1), check that autofailover promotes
a new master.
2. Stop MaxScale.
3. Start server 1 and add some events to it so it can no longer rejoin
cluster.
4. Start MaxScale, check that server 1 does not join.
5. Set current master to replicate from server 1, turning it to a relay
master.
6. Check that server 1 is master, all others are slaves (due to auto-rejoin).
Make all modules lowercase and make module loading case
insensitive. Further, make command invocation case insensitive,
as far as the module name is conserned.
During switchover, MASTER_GTID_WAIT is now called on all slaves. This causes
switchover to complete slower than before but is safer if log_slave_updates
is not on on the new master server. Also, read_only is disabled on the
demoted server if waiting on slaves or promotion fails. This should
effectively cancel the failover for the old master.
The `purge` command can be used to reset the conversion
process. Currently, executing the `purge` module command and restarting
MaxScale is the only correct way to reset the conversion process.
Added more debug assertions to JSON serialization of the Avro schema. Also
checked that the column count for the TABLE_CREATE object matches that of
the TABLE_MAP object.
The test loads multiple modules in one call so we have to pre-load them
one by one to make sure that they are all present regardless of the
locations where the individual modules were built.
All modules now have an 8-bit range for capability flags. Currently only
the client side authenticator and protocol capability bits are loaded due
to the fact that backend versions of these modules don't relate to a
particular service.
A subset of the checks done at connection creation time need to be done at
query routing time. This guarantees that the connection is closed if the
server no longer qualifies as a valid candidate.
Added teset case that checks that a change in the replication topology
correctly breaks the connection.
When the unit tests were run without installing the libraries in their
final locations, the loading of the modules would fail. Using locations
relative to the build directory allows unit testing without having to
install the libraries.
The check for the current master backend did not see if the backend was
actually in use. This would be the case when the backend would be
originally in use but would be later disabled.
Since there is a concept called "listener" it is confusing that the
dcb "this" argument in some dcb functions is called 'listener' instead
of 'dcb' as it is called everywhere else.
Using the effective name means that a module command can be invoked
both using the deprecated name as well as the actual name. E.g.
both using mysqlmon and mariadbmon even though only the last one
actually exists as a module.
The tests now reset the replication state using queries and switchover instead of
calling fix_replication(). The results are checked so these tests now test
switchover as well.
Also, reduce printing when verbose is on for any test using the get_output()-function
in fail_switch_rejoin_common.cpp.
The trailing comment removal pattern unnecessarily required that a leading
space is present in all trailing comments.
Also, the pattern didn't match if no line ending was included in the SQL
statement. The subject ending should be the third valid terminator in
addition to UNIX and Windows style line endings.