Commit Graph

9325 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
dfc7b1713a Merge branch '2.1' into 2.2 2017-12-27 11:31:27 +02:00
f1a2034c01 MXS-1587 Update mariadbmon documentation 2017-12-27 11:22:34 +02:00
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
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
58373b3495 Fix template generation
The templates weren't generated for Galera nodes.
2017-12-27 09:42:21 +02:00
d65c15d6f2 Merge branch '2.2' of github.com:mariadb-corporation/MaxScale into 2.2 2017-12-22 17:17:00 +02:00
14fe31db71 fix log copying in run_test.sh 2017-12-22 17:14:09 +02:00
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
57fc623b84 Update maxscale-system-test/.gitignore 2017-12-22 12:56:11 +02:00
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
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
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
ad57de6784 Merge branch '2.2' of github.com:mariadb-corporation/MaxScale into 2.2 2017-12-21 17:29:57 +02:00
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
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
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
4fd8ebd9eb Add missing include
The utils header was not included.
2017-12-21 12:28:54 +02:00
ff6bed6aeb Merge branch '2.1' into 2.2 2017-12-21 12:25:26 +02:00
6348ca7449 Add dependency on Jansson to the test core
The core library depends on Jansson and it must be built first.
2017-12-21 12:22:47 +02:00
3fb44e6b6e Make function const correct 2017-12-21 10:56:24 +02:00
96d084f1d6 Treat warnings as errors
Treat warnings as errors when compiling tests and fix where there
were problems.
2017-12-21 10:56:24 +02:00
071ab8302b Remove old stashed configurations
When new configuration files are stashed, remove the old ones first.
2017-12-21 10:48:08 +02:00
339ea9aedb Add a small delay to mxs1476
The test can fail if the Galera nodes aren't synced when the connection to
MaxScale is made. Adding a small sleep should allow the Galera cluster to
stabilize after the configuration switch.
2017-12-21 10:48:08 +02:00
0f015e6341 Don't log errors for unknown hostnames
When a client connects to MaxScale and authentication fails, an error
about hostname resolution is logged. This happens because the
authentication first tries to resolve the address as an IP address, then
an IPv6-mapped-IPv4 address and finally as a hostname. If users have not
been loaded, the authentication is guaranteed to fail on the first attempt
due to the lazy loading of users.
2017-12-21 10:48:08 +02:00
ee00539366 Fix mxs1509 output
The status dumping function now returns a string instead of a pointer to a
static buffer.
2017-12-21 10:48:08 +02:00
c1405bb493 Only block nodes in mxs1476
This is less of a disruption to the whole Galera cluster, which appears to
go non-primary if the nodes are stopped instead of blocked.
2017-12-21 10:48:07 +02:00
d4aeca0d24 Change strict_multi_stmt default value
The default value for strict_multi_stmt prevents compound statements and
atomic multi-statement commands from being executed without completely
disabling load balancing. As the new default value will have no practical
effect on all correct uses of readwritesplit, this is a relatively safe
thing to change.
2017-12-21 10:48:07 +02:00
9062c31865 compound_statement: Drop table if it exists
It's not an error if the table already exists, whatever the reason.
2017-12-21 10:48:07 +02:00
6b0c6ffa64 Update bug673 with new maxadmin behavior
Both the old and new style object names must work with MaxAdmin.
2017-12-21 10:48:07 +02:00
c9aa504f50 Make start_node parameters const
The second parameter can be `const char*` as it is not modified. This
fixes a compiler warning.
2017-12-21 10:48:07 +02:00
26751ae44f Use correct CDC connector for cdc_datatypes
The cdc_datatypes test did not use the correct connector and instead it
used a stale version of the MaxScale CDC Connector. The connector should
be treated as an external dependency and thus cloned at configuration
time.
2017-12-21 10:48:07 +02:00
91fc67b118 Automatically convert maxadmin arguments to new format
As the object name formatting is automated, so should the formatting of
object names in arguments. This also makes 2.2 backwards compatible with
2.1 commands.
2017-12-21 10:48:07 +02:00
a2acecd229 Fix test failures
Use correct parameter name for verify_master_failure and run MaxScale
explicitly as root in run_ctrl_c.sh.
2017-12-21 10:48:06 +02:00
0e8bdeae13 Add test for 10.1 compound statements
The test executes a compound statement through MaxScale and checks that it
is routed correctly to the master.
2017-12-21 10:48:06 +02:00
2008d08cfc Add hostname to lookup error message
This should help detect what is the hostname that causes the problem.
2017-12-21 10:48:06 +02:00
ec1a37000b Add more default parameter values
Added parameter default values to testconnections.h.
2017-12-21 10:48:05 +02:00
4d7c93f7c9 Rename test
We are testing switchover and not failover to a bad master
2017-12-21 10:24:03 +02:00
518a57f041 Change service name as spaces are replaced with dashes
If a service name contains spaced, e.g. "RW Split Router", those
spaces will be replaced with dashes at startup. Consequently, dashes
must be used when issuing commands.
2017-12-20 16:09:44 +02:00
f7d8d1d965 Add test environment dependency checks
The test environment is now checked to contain all executables needed for
testing before tests are built. They can be overridden by defining the
relevant HAVE_X variables (currently only HAVE_MYSQLTEST and HAVE_PHP are
defined).
2017-12-20 11:54:22 +02:00
b54dca50b5 Reduce excessive sleeping in tests
Some of the tests waited for excessively long periods of time for changes
to propagate. With a one second monitor interval, a sleep of around five
seconds should be plenty enough for all monitor related changes to be
propagated to all systems.
2017-12-20 11:54:22 +02:00
9962191722 Add 10.3 SEQUENCE test
The test checks that the SEQUENCE related commands return the expected
values.
2017-12-20 11:54:21 +02:00