Commit Graph

648 Commits

Author SHA1 Message Date
74cc74ed66 Remove MySQL 5.1 support from tests
Removed the configuration parameter template and the code that uses it.
2018-06-04 19:26:36 +03:00
4a3216d483 Merge branch '2.2' into develop 2018-06-04 16:00:19 +03:00
d22f6d7b1c MXS-1743: Fix load balancing with router_options=master,slave
The code that selects the candidate backend always returned the root
master if the server bitmask contained the master bit. This should only be
done if the master bit is the only bit in the bitmask and when there are
other bits, the normal candidate selection code should be used.

Also added a query to the expanded test case to make sure the connection
actually works.
2018-06-04 15:17:48 +03:00
da4397a501 MXS-1743: Expand test case to cover load balancing
The test case now verifies that the servers are actually load balanced
correctly. This test reveals a problem in the readconnroute; the master is
always preferred over slaves if one is available with
router_options=master,slave.
2018-06-04 15:17:48 +03:00
cddcc6d7d5 MXS-1896: Distinct LOAD DATA LOCAL INFILE from LOAD DATA INFILE
The two operations return different types of results and need to be
treated differently in order for them to be handled correctly in 2.2.

This fixes the unexpected internal state errors that happened in all 2.2
versions due to a wrong assumption made by readwritesplit. This fix is not
necessary for newer versions as the LOAD DATA LOCAL INFILE processing is
done with a simpler, and more robust, method.
2018-06-04 15:17:48 +03:00
2ed631ab63 Merge branch '2.2' into develop 2018-06-01 13:46:03 +03:00
dc94ec9963 MXS-1889 Improve test program
Verify that once there are slaves, we are connected
to a slave as expected.
2018-06-01 12:45:19 +03:00
a319c5ad19 MXS-1889 Add test
If all slaves are down, a connection should be created to the
master.
2018-06-01 11:00:13 +03:00
5d02d8c0ba Merge branch '2.2' into develop 2018-06-01 09:33:04 +03:00
8917458505 MXS-1890 Make it easier to run tests using local MaxScale
Now, if a test is invoked with '-l', then MaxScale is assumed to
be running locally using a configuration file suitable for the
test that is invoked. Further, at the end of the test, the log
files of MaxScale are not downloaded (obviously).

As a side-effect, an environment variable no_maxscale_log_copy,
similar to the existing no_backend_log_copy, has been introduced
using which the downloading of maxscale log files unconditionally
can be prevented.
2018-05-30 21:05:10 +03:00
2a76a36505 MXS-1778: Add missing test config
The test for the causal reads did not have the configuration file for it.
2018-05-28 10:32:17 +03:00
3cd162e1da Update avrorouter test configurations
The router_options was deprecated in 2.2 and is now removed in 2.3. This
means that test configuration files must be updated as well.
2018-05-28 10:32:15 +03:00
f62d155036 MXS-173 Test for throttling filter
The test may fail if the client/maxscale/mariadb combo is too slow.
TODO, maybe: today I saw mysql_query() hang (in a poll) when maxscale
disconnected. Is there something that can be done about that?
I added a source directory, base, for stuff that should become part of a common
utility library in the future.
2018-05-25 14:51:36 +03:00
40b31621c8 Merge branch '2.2' into develop 2018-05-25 12:15:58 +03:00
cd303df35c Revert "Trunate logs instead of removing"
This reverts commit 14dc215a787e64fb6457889b647c861f634d68a5.
2018-05-25 12:12:35 +03:00
b59e6a4baf Increase the timeouts different_size
A slight increase of the timeout to 300 seconds should solve some test
failures. The test is extremely hard on the machines and even when run
locally, the test slows down to a crawl.
2018-05-22 17:46:27 +03:00
a33f09ad06 Fix test failures and add debug logging
Fixed test failures, increased some of the timeouts, added extra info
level logging into rwsplit to help debug the test failures.
2018-05-22 17:46:27 +03:00
f03c800549 MXS-1778: Add causal_reads test case
Added a test case that checks that causal_reads works. With current
MariaDB releases, it will not work.
2018-05-22 17:46:26 +03:00
0d92b0bc8f Merge branch '2.2' into develop 2018-05-22 16:18:36 +03:00
14dc215a78 Trunate logs instead of removing
By truncating the files, tests can be run while the log is being
tailed. If they are removed, the files need to be reopened each time a
test is started.
2018-05-22 15:44:55 +03:00
2e8c19f6be Merge branch '2.2' into develop 2018-05-21 10:06:20 +03:00
540df997fb Remove unused templates file
The file has not been used since the templates.h header was added.
2018-05-21 09:50:44 +03:00
765806a633 Merge branch '2.2' into develop 2018-05-18 13:40:27 +03:00
df7c46fbdd Merge branch '2.2' into develop 2018-05-18 12:45:15 +03:00
9d10642cd7 Merge branch '2.2' of github.com:mariadb-corporation/MaxScale into 2.2 2018-05-18 12:42:24 +03:00
e911c897f6 fix cnf name in add_server_setting() 2018-05-18 12:32:23 +03:00
4b8206ee1d MXS-1873: Test large session commands
The test generates a large session command and makes sure queries after it
work correctly.
2018-05-18 12:29:47 +03:00
35f2382263 MXS-1828: Fix test case
The test case would fail due to a false positive if the query would be
routed to a slave.
2018-05-18 09:46:07 +03:00
051ed76d73 Merge branch '2.2' into develop 2018-05-17 11:23:03 +03:00
2a7f470b6b Make test failure messages unique in mxs1824_double_cursor
Having the same error for two different failures makes it harder to figure
out which one of them fails.
2018-05-17 10:57:05 +03:00
bf933ecc22 Open all ports by default
The test now flushes the INPUT chain of iptables at the start of the
test. This should open all ports even if the OS by default defines some
rules that block ports.
2018-05-17 10:04:00 +03:00
4309d9b3a5 Change mxs1836_show_eventTimes port from 9003 to 4006
Port 9003 is not open by default in the test environment. Changing it to
port 4006, which is open, will work around this restriction.

Also added the mysql_error output to the error message when the querying
fails.
2018-05-17 09:50:37 +03:00
22d6687f9f Fix paths in mxs1110_16mb
The paths that the test used assumed that the binary was built
in-source. This is a relic of the test refactoring and seems to have gone
unnoticed.
2018-05-17 09:39:19 +03:00
52e8c08a61 Disable warnings when dropping databases
Dropping a database with DROP DATABASE ... IF NOT EXISTS will cause
warnings to be logged if it doesn't exist. The masking_user test was
missing the part that disables these warnings.
2018-05-17 09:34:01 +03:00
95815df1db Merge branch '2.2' into develop 2018-05-16 11:46:45 +03:00
84ac115af8 MXS-1760: Add use_sql_variables_in test case
The test checks that both text protocol and binary protocol statements
produce the correct result.
2018-05-16 11:13:36 +03:00
2ae46190d0 Remove stale cdc_connector files
The old files were still in the source code which caused problems with the
build.
2018-05-16 11:13:36 +03:00
7e9062f20f Merge branch '2.2' into develop 2018-05-16 09:31:13 +03:00
5ed5d98bcd MXS-1836 Add test that catches regression 2018-05-15 14:45:42 +03:00
e1e7ebe5d2 Remove .gitignore from test directory
The file is not required as the tests can now be built out-of-source. All
common ignored files are still handled by the main .gitignore file.
2018-05-15 10:15:32 +03:00
b776ed7821 Don't assume source and binary directories are the same
Some of the scripts assumed that other scripts would be located in the
same directory where the current script was executed.

Also fixed the SSL connection creation which depended on an obsolete
environment variable causing all out-of-source SSL tests to fail.
2018-05-15 10:14:38 +03:00
16b777ad17 Fix shell-script tests
The tests expected the source directory to contain the executables.
2018-05-15 10:14:38 +03:00
ed2d0f4a5b Allow out-of-source test runs
The test can now be run outside of the test source directory. Since the
`test_dir` global variable contains the absolute path to the test source,
all copying of configurations and execution of scripts can be done with
minimal changes.
2018-05-15 10:14:38 +03:00
00581e7f35 MXS-1826: Fix COM_CHANGE_USER regression
The re-authentication done in MaxScale caused multiple error packets to be
sent for the same COM_CHANGE_USER. In addition to this, the failure of
authentication did not terminate the client connection.

The change in behavior requires the test case to be changed as well.
2018-05-15 10:14:38 +03:00
75eded4b89 Merge branch '2.2' into develop 2018-05-14 11:24:09 +03:00
b3d29da3d2 MXS-1861 Test that reveals problem
As this is so closely related to MXS-1719 the test program for
that is slightly modified to catch this one as well.
2018-05-14 10:15:36 +03:00
ec4569497e Merge branch '2.1' into 2.2 2018-05-14 10:14:16 +03:00
d7ca5f5b5d MXS-1628: Add bad handshake test case
The test checks that a bad handshake error is returned when a malformed
packet is sent.
2018-05-10 22:24:39 +03:00
d6c44aaf52 MXS-1804: Allow large session commands
Session commands that span multiple packets are now allowed and will
work. However, if one is executed the session command history is disabled
as no interface for appending to session commands exists.

The backend protocol modules now also correctly track the current
command. This was a pre-requisite for large session commands as they
needed to be gathered into a single buffer and to do this the current
command had to be accurate.

Updated tests to expect success instead of failure for large prepared
statements.
2018-05-03 09:46:47 +03:00
dc4086b182 MXS-1828: Create test case
Created a test case that performs two LOAD DATA LOCAL INFILE statements in
one query. Currently, the test will fail as the issue is not resolved.
2018-05-03 09:46:46 +03:00