9348 Commits

Author SHA1 Message Date
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
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ä
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
Johan Wikman
1908faf150 MXS-1527 Add test case 2017-12-27 14:14:51 +02:00
Markus Mäkelä
8ef681d8cd Fix trivial memory leaks
Fixed trivial memory leaks detected by ASAN when running internal test
suite.
2017-12-27 11:56:39 +02:00
Markus Mäkelä
26b2a4b15d Fix executable names for core tests
The core test executable names were not in the new format.
2017-12-27 11:49:33 +02:00
Markus Mäkelä
71d3009cd6 Make a deep copy of queued queries
If a shallow copy of the buffer is made, any modifications that are made
to the data after it has been queued will affect the queued query of the
LocalClient.

A copy-on-write mechanism would save the relatively expensive process of
copying the data but since the LocalClient is not often used, it is not
the most critical performance problem.
2017-12-27 11:39:53 +02:00
Johan Wikman
dfc7b1713a Merge branch '2.1' into 2.2 2017-12-27 11:31:27 +02:00
Johan Wikman
f1a2034c01 MXS-1587 Update mariadbmon documentation 2017-12-27 11:22:34 +02:00
Johan Wikman
d4f9cb661f MXS-1587 Rename mysqlmon to mariadbmon
'mysqlmon' is still accepted but 'mariadbmon' is loaded instead.
This is done at runtime instead of e.g. by using a symbolic link,
so that a warning can be logged.

The warning is logged and the translation of the module name is
made by the code that loads the modules so that it's easy to do
the same thing for other modules as well.

In a subsequent commit the documentation is updated.
2017-12-27 11:22:27 +02:00
Johan Wikman
ba9b4a3bf6 MXS-1527 Do not consider sysvars to be updated in SELECT
A statement like

    select if(@@hostname='box02','prod_mariadb02','n');

does not modify @@hostname. Hence the type mask should be
QUERY_TYPE_READ|QUERY_TYPE_SYSVAR_READ and NOT
QUERY_TYPE_READ|QUERY_TYPE_GSYSVAR_WRITE.
2017-12-27 11:09:36 +02:00
Markus Mäkelä
58373b3495 Fix template generation
The templates weren't generated for Galera nodes.
2017-12-27 09:42:21 +02:00
Timofey Turenko
d65c15d6f2 Merge branch '2.2' of github.com:mariadb-corporation/MaxScale into 2.2 2017-12-22 17:17:00 +02:00
Timofey Turenko
14fe31db71 fix log copying in run_test.sh 2017-12-22 17:14:09 +02:00
Esa Korhonen
3ccd6eed28 MXS-1588 Fix switchover
Change the ordering of the two flushes such that FLUSH LOGS comes last.
This seems to make sure gtid:s are updated to newest values before
the MASTER_GTID_WAIT-call. Without this fix, switchover does complete
succesfully, but some of the slaves may not be able to replicate due to
not having same events as new master. Exact reason for this still unclear.
2017-12-22 13:35:36 +02:00
Johan Wikman
57fc623b84 Update maxscale-system-test/.gitignore 2017-12-22 12:56:11 +02:00
Johan Wikman
cc0f41e446 Remove 2.1 release notes from 2.2
Every minor branch contains only the release notes for that
branch.
2017-12-22 12:56:11 +02:00
Markus Mäkelä
3e65163429 Add more descriptive errors to blob_test functions
The expected and received value are now both logged when an error
occurs. The execution is also cut short to prevent excessive message
flooding as most of the time all comparisons fail.
2017-12-22 11:45:32 +02:00
Markus Mäkelä
fb1875c61c Pre-load users for all threads
Pre-loading users for all threads at startup significantly reduces the
chance for failures caused by the lazy initialization of the user database
done by the authenticators.

If users are not loaded at startup and the connection limit for all
servers is reached, authentication in MaxScale will fail not due to too
many connections but due to the lack of authentication data. This causes
repeated reloading of users, which floods the log with messages, and
unnecessary stress on the cluster itself.
2017-12-22 11:45:32 +02:00
Timofey Turenko
ad57de6784 Merge branch '2.2' of github.com:mariadb-corporation/MaxScale into 2.2 2017-12-21 17:29:57 +02:00
Timofey Turenko
5c7845c381 Galera startup crash fix, temporal removal of revert snapshot (Galera does not survive revert)
and add cores saving from tests themselves.
2017-12-21 17:20:41 +02:00
Markus Mäkelä
029f595100 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-21 17:07:58 +02:00
Markus Mäkelä
79652301d8 Fix split of mysqlmon sources
For some reason, the source code of mysqlmon was split into C and C++
sources. This caused problems by effectively discarding all changes from
2.1 that are merged into 2.2.

This commit merges the changes into the correct file that were added to
the wrong file.
2017-12-21 16:24:03 +02:00
Markus Mäkelä
4fd8ebd9eb Add missing include
The utils header was not included.
2017-12-21 12:28:54 +02:00
Markus Mäkelä
ff6bed6aeb Merge branch '2.1' into 2.2 2017-12-21 12:25:26 +02:00