9370 Commits

Author SHA1 Message Date
Esa Korhonen
a6914ebefe MXS-1565: Test for invalid old master rejoin
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).
2018-01-04 10:34:03 +02:00
Esa Korhonen
632f9f2864 Fix typo in help message 2018-01-04 10:17:25 +02:00
Johan Wikman
c31881914b MXS-1584 Correctly classify "SELECT NEXT VALUE FOR seq" 2018-01-04 10:11:19 +02:00
Johan Wikman
224f918845 MXS-1592 Make all modules lowercase
Make all modules lowercase and make module loading case
insensitive. Further, make command invocation case insensitive,
as far as the module name is conserned.
2018-01-03 14:57:18 +02:00
Johan Wikman
289ae983df Replace log custom spinlocks with SPINLOCK 2018-01-03 14:54:41 +02:00
Johan Wikman
df0def9c97 Remove unused skygw_-functions 2018-01-03 14:53:50 +02:00
Markus Mäkelä
7d8905d91f Merge branch '2.1' into 2.2 2018-01-03 14:05:31 +02:00
Markus Mäkelä
3bba88408c Remove random sleep interval from acquire_lock
The function caused problems with tests and the random sleep is truly not
needed (legacy code and it doesn't bring any visible benefits).
2018-01-03 13:08:46 +02:00
Esa Korhonen
047c08f577 MXS-1588: Wait on all slaves during switchover
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.
2018-01-03 12:52:33 +02:00
Markus Mäkelä
00ca809963 MXS-1542: Add test case
Added test case that checks whether UTF16 strings work. The test is
expected to fail.
2018-01-03 10:37:25 +02:00
Markus Mäkelä
b5914df4f9 Add documentation on how to reset the conversion process
The resetting of the conversion process is now documented.
2018-01-03 09:55:18 +02:00
Markus Mäkelä
f5484a1011 MXS-1576: Add purge command to avrorouter
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.
2018-01-03 09:44:41 +02:00
Markus Mäkelä
a86b81824f MXS-1575: Add extra debug assertions
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.
2018-01-03 09:44:41 +02:00
Markus Mäkelä
5c624f9dda Print output for failed unit tests
Add arguments so that CTest prints the output of the test if it fails.
2018-01-03 09:44:17 +02:00
Markus Mäkelä
200657e2f6 Pre-load binlogrouter modules for the test
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.
2018-01-03 08:56:41 +02:00
Markus Mäkelä
8d15256d70 MXS-1539: Add asynchronous authenticator capability
The new ACAP_TYPE_ASYNC capability allows the authenticator to tell the
core that all entry points for it support asynchronous usage.
2018-01-03 08:56:41 +02:00
Markus Mäkelä
6036c1cdca MXS-1539: Assign capability bits for all module types
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.
2018-01-03 08:56:41 +02:00
Markus Mäkelä
9689271a34 MXS-1541: Use session ID in topfilter
The topfilter now uses the session ID as the filename suffix.
2018-01-03 08:56:41 +02:00
Esa Korhonen
d587f4b3ea Fix calling a module command when module name has alternate mapping 2018-01-02 15:22:46 +02:00
Markus Mäkelä
f810ce9ea3 Fix binlogrouter unit test failure
The test used LD_LIBRARY_PATH to find the module instead of using an
explicit path.
2018-01-02 11:22:39 +02:00
Markus Mäkelä
9a8bf8555a Update release notes
Added MXS-1516 to the release notes.
2018-01-02 11:08:09 +02:00
Markus Mäkelä
bacc11d28e MXS-1516: Validate the connection on each query
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.
2018-01-02 11:03:36 +02:00
Johan Wikman
9558addbfe Update module name for mariadbmon 2018-01-02 11:01:28 +02:00
Johan Wikman
eddd4db606 MXS-1562 Test switchover under ideal conditions 2018-01-02 10:21:01 +02:00
Markus Mäkelä
3f0ef7481e Fix test build failure
The ssh_node_f function does not exist in 2.1.
2018-01-02 10:10:25 +02:00
Markus Mäkelä
cf29430476 Merge branch '2.1' into 2.2 2018-01-02 09:31:07 +02:00
Timofey Turenko
aed66e28f6 remove unnecessary template copying from upgrade_test.sh 2018-01-02 08:30:36 +02:00
Timofey Turenko
6645281aeb add killing mysqld process after snapshot revert 2018-01-02 07:32:44 +02:00
Johan Wikman
bac3b95f0e Add 2.1.13 Release Notes, update ChangeLog and Upgrading 2017-12-29 12:32:33 +02:00
Johan Wikman
7d4fcf9e89 Update MaxScale 2.1 version number
2.1.13
2017-12-29 12:28:35 +02:00
Timofey Turenko
ef79db4362 add killing mysqld process after snapshot revert 2017-12-29 12:12:20 +02:00
Johan Wikman
d2a30cf7d7 Modify test mxs1585.cpp for 2.2 2017-12-29 11:57:13 +02:00
Markus Mäkelä
8ac5c3d377 MXS-1585: Make the test more precise
The test now more precisely exercises the code where the crash happened.
2017-12-29 11:04:13 +02:00
Markus Mäkelä
ee8161af83 Fix mxs1509
Temporarily disable the multi-source part of the test. Explicitly set
gtid_slave_pos when changing master. Add missing parameter to
configuration.
2017-12-29 11:01:07 +02:00
Markus Mäkelä
95983ddaf4 Fix unit test failures
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.
2017-12-29 10:09:16 +02:00
Markus Mäkelä
a46881c0cc MXS-1585: Check that the master refence is in use
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.
2017-12-29 10:05:19 +02:00
Markus Mäkelä
8b2aa52384 Merge branch '2.1' into 2.2 2017-12-29 08:42:49 +02:00
Johan Wikman
da77b0419c Call the DCB "this" consistently for dcb
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.
2017-12-29 08:34:46 +02:00
Johan Wikman
140620a366 MXS-1582 Close listener sockets on exit
If the listener socket refers to a Unix domain socket, the socket file
will be deleted as well.
2017-12-29 08:34:46 +02:00
Johan Wikman
6f3a580168 Fix test due to mysqlmon -> mariadbmon change
Test that a command can be invoked both using the actual module name
and the deprecated one.
2017-12-29 08:34:46 +02:00
Johan Wikman
c48c4c7950 Use the effective name when looking for a module
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.
2017-12-29 08:34:46 +02:00
Johan Wikman
1fb2608521 Expose module mapping function
The effective name of a module can now be obtained also
outside the module loading mechanism.
2017-12-29 08:34:46 +02:00
Esa Korhonen
6b2133d6a6 Fix mysqlmon_failover_auto and mysqlmon_failover_manual
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.
2017-12-28 21:54:58 +02:00
Markus Mäkelä
b543f37a11 Run unit tests for each build
The unit tests must pass for the build to successfully continue.
2017-12-27 17:21:42 +02:00
Markus Mäkelä
5ede5a4f96 Fix comment removal regex
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.
2017-12-27 17:21:42 +02:00
Markus Mäkelä
c6bc1f7327 MXS-1585: Add preliminary test case
The test case attempts to simulate the environment where the crash appears
to have happened. Local testing does not point out any problems.
2017-12-27 17:21:42 +02:00
Markus Mäkelä
3ca32457db Don't force verbose output
The tests shouldn't force verbose output.
2017-12-27 17:21:42 +02:00
Markus Mäkelä
3b7275ec41 Use default value for "smoke"
The values should only be updated if the environment variable is defined.
2017-12-27 17:21:42 +02:00
Johan Wikman
33b1c552e0 Load qc from build directory
The query classifier library will now be loaded from the build
directory and not from the installation directory.
2017-12-27 16:09:54 +02:00
Johan Wikman
c6e0d1f33c Fix canonizer test programs 2017-12-27 15:34:18 +02:00