Commit Graph

632 Commits

Author SHA1 Message Date
3a1c2119fb MXS-1804: Fix hanging of large session commands
Large session commands weren't properly handled which caused the router to
think that the trailing end of a multi-packet query was actually a new
query.

This cannot be confidently solved in 2.2 which is why the router session
is now closed the moment a large session command is noticed.
2018-04-17 15:04:12 +03:00
232f807ef3 MXS-1808: Only store SQL statements for retrying
Only commands that can contain an SQL statements should be stored for
retrying (COM_QUERY and COM_EXECUTE). Other commands are either session
commands or do not work with query retrying.
2018-04-17 11:25:56 +03:00
5cb4c9dd97 Merge branch '2.2' into develop 2018-04-17 09:36:40 +03:00
890902e338 Add maxinfo SQL interface test
Added a test for the maxinfo SQL interface.
2018-04-17 09:34:11 +03:00
ec33fcf87d Merge branch '2.2' into develop 2018-04-13 14:53:00 +03:00
e3b11d866f Use explicit types with get_row
Auto types aren't very neat as return values because they move the burden
of knowledge to the reader. Using an explicit, and somewhat
self-explanatory, type makes it easier to assess the code without knowing
the implementation of the type.
2018-04-13 08:48:21 +03:00
b060e3a289 MXS-1787: Add test case
Added a test case that reproduces the problem.
2018-04-12 20:36:46 +03:00
802b16f709 MXS-1786: Fix hang on COM_STATISTICS
The commands needs to be handled separately from the rest of the result
types.

Added a test case that reproduces the problem and verifies that the change
in code fixes it.
2018-04-12 20:00:00 +03:00
385a221194 MXS-1506: Add cluster failure test
The test exercises the retrying code by failing both nodes.
2018-04-12 10:42:40 +03:00
553e159182 MXS-1503: Test that no extra slaves are taken into use
Added a test that verifies that the slave connection count restrictions
work.
2018-04-12 10:42:39 +03:00
a663ea2e80 Sync slaves in mxs1071_maxrows
The first test could fail due to replication lag.
2018-04-12 10:29:26 +03:00
252475cdc5 MXS-1776: Add test case
Added test case that reproduces the problem.
2018-04-11 15:13:20 +03:00
c0a3e6ba37 MXS-1773: Add test case
Added a test case that reproduces the problem and verifies that it is
fixed.
2018-04-11 09:45:13 +03:00
eafdd61888 MXS-1506: Test interrupted SELECTs
Expanded the test to cover interrupted SELECT statements.
2018-04-10 15:32:24 +03:00
15bb90afc4 MXS-1506: Extend test case
Extended test case to cover interrupted writes.
2018-04-10 15:32:24 +03:00
93f589ffa2 MXS-1506: Add test case
Added a test case that performs basic testing of the functionality.
2018-04-10 15:32:23 +03:00
304499bd36 Merge branch '2.2' into develop 2018-04-10 14:05:39 +03:00
599f46ca7b Minor cleanup of different_size.cpp
Cleaned up the main testing function.
2018-04-04 19:43:47 +03:00
4f8e1a99fc MXS-1743: Add test case
Added test case that reproduces the problem.
2018-04-04 19:43:46 +03:00
90c2d575c5 Add missing test labels
Added missing labels to tests that didn't have them. Also added a few
clarifying comments.
2018-04-03 16:27:18 +03:00
36b10d3f05 MXS-1502: Log session command warning only once
The warning that tells the user that the session command history has been
exceeded is now only logged once. This is to prevent the message from
being repeatedly logged when the default value is not large enough.

Also fixed the session_limits test to use distinct session commands. This
way the session command history compaction is not in effect and the test
again tests the correct thing.
2018-04-03 13:32:10 +03:00
34346f4de9 MXS-1503: Update tests with new expected results
The master reconnection change makes the second test faulty in
mxs359_error_on_write. After unblocking the master, the session will
reconnect to the master and the query will succeed.
2018-04-03 13:32:10 +03:00
ff496979f6 MXS-1503: Add test case
Added test case that checks that session commands are properly executed.
2018-04-03 13:30:54 +03:00
876187b340 MXS-1503: Enable master reconnection
The `master_reconnection` parameter now controls both the reconnection of
the master server as well as the migration of the master server to another
server. Although these two cases appear to be different, the end result
from readwritesplit's point of view is the same and are thus controlled
with the same parameter.

The RWBackend class now resets its internal state when it is closed. This
allows readwritesplit to handle the case when a result was expected from
the master but the master died before the result was returned. The same
code should also handle slave connection failures mid-result, allowing
Backend reuse.

Added a test case that verifies the new functionality when combined with
`master_failure_mode=error_on_write`.
2018-04-03 13:30:51 +03:00
481db8acbc MXS-359: Rename parameter to master_reconnection
Changing the parameter name to `master_reconnection` allows similar
reconnection functionality to be combined under one parameter.
2018-04-03 13:30:51 +03:00
9f256f50eb Merge branch '2.2' into develop 2018-04-03 11:01:06 +03:00
9291815bcd Wait for monitor to start in mxs1719
The test starts MaxScale and immediately connects to it. As the monitoring
is asynchronous, we need to give it a few seconds to stabilize.
2018-04-03 10:59:55 +03:00
4167e88719 MXS-1751: Fix crash with available_when_donor=true
The `MYSQL_ROW row` variable was being overwritten by the extra query done
by the SST method detection code. Moving it into its own function prevents
this and makes the code significantly easier to comprehend.

Added a test case that reproduced the problem (MaxScale crashed) and
verifies that the patch fixes the problem.
2018-03-31 20:21:07 +03:00
b11fb53b95 Merge branch '2.2' of github.com:mariadb-corporation/MaxScale into 2.2 2018-03-29 15:51:52 +03:00
fa41ca28e2 remove trailing whitespaces from MDBCI scripts 2018-03-29 15:51:36 +03:00
3da5b535c8 Merge branch '2.2' into develop 2018-03-29 14:25:40 +03:00
01b04094a6 Only check for cores at root level
The previous core check would pick up any file in /tmp/ that would start
with the `core` prefix. This included some npm generated files which are
created if MaxCtrl is built on the MaxScale machine.
2018-03-29 14:25:19 +03:00
fc9998f1b4 Merge branch '2.2' into develop 2018-03-28 16:50:45 +03:00
eca77fb4c9 Improve core dump detection
The core dump detection now properly distinguishes core dumps and ssh
failures.
2018-03-28 16:50:27 +03:00
6ec87ae9f2 Merge branch '2.2' into develop 2018-03-28 09:19:42 +03:00
3be2ee8b28 Merge branch '2.1' into 2.2 2018-03-28 09:19:22 +03:00
ed6b19f7f7 Merge branch '2.2' into develop 2018-03-27 14:05:47 +03:00
e921298af9 add Maxscale stop into test init procedure 2018-03-27 12:58:05 +03:00
de768469b9 Fix hanging of mxs1585
The test appears to hang when the `SET sql_log_bin = 0` statement is
executed. Removing this seems to fix it and is OK as that's not what the
test aims to check.
2018-03-27 11:50:30 +03:00
cbbfb1c5c0 Merge branch '2.2' into develop 2018-03-27 07:25:32 +03:00
801d7ccdc7 Add sleep to pers_02
Adding a short sleep before the second attempt at connection creation is
done seems to significantly improve the reliability of the test.
2018-03-27 07:24:30 +03:00
32bfcc117b MXS-1731: Ignore empty values in persisted configs
If a MaxScale-generated configuration defines an empty value, it is
ignored with the assumption that the next modification will cause the
problem to correct itself.
2018-03-27 07:24:29 +03:00
cf547b9532 Merge branch '2.2' into develop 2018-03-26 10:03:20 +03:00
7be6f52d4a MXS-1733 Add test for revealing the problem 2018-03-26 10:02:57 +03:00
03310fa981 Add missing .cpp suffix
It doesn't appear to be necessary but other files use it.
2018-03-21 14:58:09 +02:00
433528aa59 MXS-1731: Treat empty parameters as errors
If a parameter is defined without a value, it is now treated as an error.
2018-03-21 14:58:09 +02:00
552c33e14d MXS-1719 Add test that reveals problem
With the masking filter, several UPDATEs as one multi-statement
causes the session to hang.
2018-03-21 14:58:09 +02:00
42412149bd Add missing .cpp suffix
It doesn't appear to be necessary but other files use it.
2018-03-21 14:14:14 +02:00
8b943e249b MXS-1731: Treat empty parameters as errors
If a parameter is defined without a value, it is now treated as an error.
2018-03-21 14:14:13 +02:00
f5562d2cab MXS-1719 Add test that reveals problem
With the masking filter, several UPDATEs as one multi-statement
causes the session to hang.
2018-03-21 13:39:03 +02:00