10457 Commits

Author SHA1 Message Date
Esa Korhonen
b71710e066 MXS-1865 Combine server version and type
Binlog server is now handled better.
2018-05-16 13:55:45 +03:00
Esa Korhonen
b29bae6e84 MXS-1865 Update server version only when (re)connecting
Updating it every iteration is needless.
2018-05-16 13:55:45 +03:00
Markus Mäkelä
95815df1db
Merge branch '2.2' into develop 2018-05-16 11:46:45 +03:00
Markus Mäkelä
bcc3312d8e
Merge branch '2.1' into 2.2 2018-05-16 11:45:48 +03:00
Markus Mäkelä
ca0f37a4c0
Document maxpasswd encryption algorithm
Documented the maxpasswd encryption algorithm in the configuration guide.
2018-05-16 11:13:36 +03:00
Markus Mäkelä
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
Markus Mäkelä
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
Markus Mäkelä
fda5bc8e56
Add persistent connection count to servers resource
The number of persisted connections was not shown in the server resource.
2018-05-16 11:13:36 +03:00
Markus Mäkelä
46d1187172
Backport GCC 8 fixes to 2.1
Backported the minimal set of changes required to build 2.1 with GCC
8. The format-truncation and format-overflow warnings are disabled instead
of fixed in 2.1 to remove duplication of effort that was already done in
2.2 (the commit doesn't cherry-pick cleanly).
2018-05-16 11:09:47 +03:00
Johan Wikman
036c06fb94 Add change log and release notes for 2.2.6 2018-05-16 09:38:11 +03:00
Johan Wikman
7e9062f20f Merge branch '2.2' into develop 2018-05-16 09:31:13 +03:00
Johan Wikman
b5888d8950 Merge branch '2.1' into 2.2 2018-05-16 09:23:54 +03:00
Johan Wikman
05a6f12c63 Update release date 2018-05-16 09:21:22 +03:00
Johan Wikman
5ed5d98bcd MXS-1836 Add test that catches regression 2018-05-15 14:45:42 +03:00
Markus Mäkelä
3e0a0988f0
MXS-1628: Fix default database extraction
The default database was not extracted correctly as the length of the
user's name did not include the null terminator. Also the comparison for
database name length used the smaller than operator instead of the correct
larger than operator.
2018-05-15 11:23:11 +03:00
Johan Wikman
30cce333fd MXS-1775 Add documentation 2018-05-15 11:09:52 +03:00
Johan Wikman
75b5f57d51 MXS-1775 Add function for obtaining the server disk space
From 10.1.32, 10.2.14 and 10.3.6 onwards, there is an
information_schema plugin called DISKS using which information
about the disk space situation on the server can be obtained.

Subsequent commits will add configuration options for specifying
limits and take the functionality in use in monitors where it makes
sense.
2018-05-15 11:09:52 +03:00
Markus Mäkelä
54ac0992f7
Use address of spinlock
The SPINLOCK_IS_LOCKED macro assumes that a pointer to a spinlock is given
as the parameter.
2018-05-15 10:33:05 +03:00
Markus Mäkelä
10806f8d8c
Update client SHA1 on reauthentication
When the client reauthenticates via COM_CHANGE_USER the new SHA1 needs to
be stored as the backend connections rely on it being up-to-date.

This commit fixes the regression of the mxs548_short_session_change_user
test.
2018-05-15 10:15:32 +03:00
Markus Mäkelä
f29da6545b
MXS-1843: Test log throtting in a unique directory
This rules out external influence as a reason for the test failure.
2018-05-15 10:15:32 +03:00
Markus Mäkelä
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
Markus Mäkelä
521cce7c17
Refresh users on failed reauthentication
If the reauthentication of a client that is performing a COM_CHANGE_USER
fails, the users need to be reloaded. Without the reloading, the
reauthentication will fail if new users were added after the last loading
of users.
2018-05-15 10:15:32 +03:00
Markus Mäkelä
ee2c3e21c7
Fix server priority regression
Servers without priorities were chosen instead of servers with
priorities. This caused at least the server_weight test to fail.
2018-05-15 10:15:32 +03:00
Markus Mäkelä
df1f3ca7c6
Fix monitor_interval log message
The message had the parameter and monitor names the wrong way around.
2018-05-15 10:15:32 +03:00
Markus Mäkelä
97eb7d2f9e
Fix deadlock in galeramon
The parameter extraction caused a recursive lock of the server
spinlock. To work around this, an unlocked version of server_get_parameter
is needed.

Ideally, a lock-free setup would be used but due to this being a bug fix,
it will have to be done later on.
2018-05-15 10:15:26 +03:00
Markus Mäkelä
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
Markus Mäkelä
16b777ad17
Fix shell-script tests
The tests expected the source directory to contain the executables.
2018-05-15 10:14:38 +03:00
Markus Mäkelä
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
Markus Mäkelä
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
Esa Korhonen
4b988d99a1 Print error descriptions when a PAM function fails 2018-05-14 12:35:54 +03:00
Esa Korhonen
c6b8277281 Cleanup server status querying
No functional changes except that status changes are no longer logged when
querying. It was bugged to begin with.
2018-05-14 11:32:02 +03:00
Esa Korhonen
df4454027a Clean up monitor initialization and destruction
Since monitors are now freed at MaxScale exit, the server data should be freed. Also,
gtid domain variables are now initialized with a common constant.
2018-05-14 11:32:02 +03:00
Markus Mäkelä
75eded4b89
Merge branch '2.2' into develop 2018-05-14 11:24:09 +03:00
Esa Korhonen
97328a61f0 Use MonitorApi in MariaDBMonitor 2018-05-14 11:11:08 +03:00
Esa Korhonen
b92284afc4 Move server querying to MariaDBServer
The query functions still require the base monitor struct because of
mon_ping_or_connect_to_db().
2018-05-14 11:11:08 +03:00
Esa Korhonen
38647a0c69 Increase monitor sleep accuracy
Now the last sleep of a monitor loop is of correct duration.
2018-05-14 11:11:08 +03:00
Esa Korhonen
0b459c0496 Always check monitor permissions when starting monitor
Servers could have been added while monitor was down so better be on the safe side.
2018-05-14 11:11:08 +03:00
Johan Wikman
5eb6718b75 MXS-1861 Detect and handle multistatement responses
Multi-statement SELECTs were properly detected and handled,
but e.g. multi-statement UPDATESs were not, with the result
that erronous warnings were logged.

Now the responses are detected and handled properly.
2018-05-14 10:15:36 +03:00
Johan Wikman
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
Markus Mäkelä
ec4569497e
Merge branch '2.1' into 2.2 2018-05-14 10:14:16 +03:00
Johan Wikman
42c10cfa1c MXS-1848 Move Worker from internal to public include dir
maxscale::Worker needs to be public if monitors should be
implementable using it.
2018-05-14 10:10:18 +03:00
Johan Wikman
4e6184c894 Update 2.1.17 release notes 2018-05-14 10:07:10 +03:00
Markus Mäkelä
0a39fab562
Update 2.1.17 release notes
Added newly fixed bugs into the release notes.
2018-05-14 09:40:45 +03:00
Markus Mäkelä
9c8cd07a00
MXS-1628: Prevent out-of-bounds read on bad handshake packet
If the client would send a malformed handshake packet, out-of-bounds
memory could be read.
2018-05-14 09:40:40 +03:00
Markus Mäkelä
48aa76e1d4
Fix invalid JSON in masking filter documentation
The example JSON was missing a comma where one was expected.
2018-05-10 22:26:32 +03:00
Markus Mäkelä
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
Markus Mäkelä
7d784001df
MXS-1628: Respond with correct error to malformed packets
If the client sent a malformed authentication response packet, MaxScale
would interpret that as failed authentication.
2018-05-10 22:24:39 +03:00
Markus Mäkelä
a544239540
Fix masking filter documentation
The example had invalid JSON in it.
2018-05-10 22:24:14 +03:00
Markus Mäkelä
dbbd0e957a
MXS-1852: Close partially connected DCBs if killed
If a connection is killed but the backend DCBs have not yet received their
thread IDs, the connections can be forcibly closed. This removes the
possibility of stale connections caused by an unfortunately timed KILL
query to a session that has partially connected to some servers.
2018-05-10 14:05:55 +03:00
Esa Korhonen
370b3be576 MXS-1703 Support "Preparing" in Slave_IO_Running
Is interpreted as "Connecting".
2018-05-09 12:49:23 +03:00