12666 Commits

Author SHA1 Message Date
Johan Wikman
01c4beec10 MXS-2470 Update tail pointer in gwbuf_clone 2019-05-14 13:36:33 +03:00
Johan Wikman
600e23ae2d MXS-2470 Add unit test that reveals problem 2019-05-14 13:36:33 +03:00
Johan Wikman
195eeb0c64 Merge branch '2.2' into 2.3 2019-05-14 12:34:40 +03:00
Timofey Turenko
ffecce4153 Fix non_native_setup
The arguments must be passed as-is to the TestConnections constructor.
2019-05-14 10:54:32 +03:00
Johan Wikman
b7d948db3f MXS-2475 Properly setup the Galera nodes 2019-05-14 10:13:09 +03:00
Johan Wikman
79cfd7183d MXS-2475 Fix mxs1980_blr_galera_server_ids test
At some point the replicating slave had been changed to be
a Galera node. Won't work as the Galera node is a master.
2019-05-14 10:13:09 +03:00
Markus Mäkelä
b10fc196a1
Fix maxinfo/maxadmin debug assertion
Both services could write to a DCB from a worker that doesn't own it.
2019-05-10 11:23:10 +03:00
Markus Mäkelä
142038051c
Fix GCC 9 warnings
GCC 9 has warnings about pessimistic return values which are triggered by
returning a local value via std::move.
2019-05-10 09:11:40 +03:00
Markus Mäkelä
1efe3e0b20
Fix avrorouter client notifications
The notifications that tell clients about new data weren't using the
correct mechanism.
2019-05-10 09:11:39 +03:00
Markus Mäkelä
37bfe1cd67
Never exceed persistent connection limits
By doing the persistent connection count incrementation with CAS, value
can be guaranteed to never exceed the configured limit.
2019-05-10 09:11:39 +03:00
Johan Wikman
034dc6a67e MXS-2472 Update BLR docs on secondary masters 2019-05-09 17:14:57 +03:00
Johan Wikman
3c5a932010 Fix masking_mysqltest for 2.3
Since UNIONs that would allow a column to be masked are
rejected, there is no need to check that masking is performed
since we will never get that far.
2019-05-09 17:12:52 +03:00
Markus Mäkelä
c72dbb6f46
MXS-2448: Fix connection counts of persistent DCBs
DCBs that were closed while they were persisted were double decremented.
2019-05-09 13:53:32 +03:00
Markus Mäkelä
d2e49c9591
MXS-2448: Assert that connection counts never go negative
The connections should never go below zero. It seems that at least pers_01
test suffers from this.
2019-05-09 13:06:27 +03:00
Markus Mäkelä
567ad9b8b8
Fix galeramon regression
The comparisons were wrong: strcasecmp returns 0 for equal strings.
2019-05-09 12:30:29 +03:00
Markus Mäkelä
59f2145c00
Allocate blr heartbeat buffer on correct worker
The buffer was allocated on one worker and written on another.
2019-05-09 12:30:29 +03:00
Markus Mäkelä
788dc429f8
Do client callback on owning worker
The callback should've been done on the worker that owns the DCB instead
of the main worker.
2019-05-09 12:30:26 +03:00
Johan Wikman
b313c6d0e7 MXS-2474 Ignore attempts to re-register a housekeeper task
It is an error to register the same task multiple times, but
for a maintenance release it is simpler and less risky to simply
ignore an attempt (that BLR does) to do that.

Allowing a task to be registered anew causes behaviour akin
to a leak.
2019-05-09 10:58:35 +03:00
Johan Wikman
5ea2bab88c Merge branch '2.2' into 2.3 2019-05-08 15:56:08 +03:00
Johan Wikman
ff1959fda7 Merge branch '2.2.21' into 2.2 2019-05-08 15:55:42 +03:00
Johan Wikman
73f8bf1f6f Update 2.2.21 release date 2019-05-08 15:49:11 +03:00
Esa Korhonen
1df6495d9a Update release notes on MariaDB-Monitor change 2019-05-08 15:32:08 +03:00
Markus Mäkelä
a652b6bd5b
Add advance(int) to mxs::Buffer iterators
This makes iterating over packets in buffers faster while still
maintaining the requirements for forward iterators. Not using operator+=
makes it clear that this is not a random access iterator.
2019-05-08 10:33:27 +03:00
Markus Mäkelä
0638ea736e
Write slave heartbeat in correct thread
The writing should be done on the worker that owns the DCB.
2019-05-08 09:44:55 +03:00
Johan Wikman
9ae25e67a8 Update maintenance number in 2.2 minor branch 2019-05-07 15:27:48 +03:00
Johan Wikman
a7a2215681 Update release notes and change log 2019-05-07 15:22:37 +03:00
Marko
4e3a581c94 Merge branch '2.2' into 2.3 2019-05-06 20:09:37 +03:00
Marko
adde085b7d Fix incorrect closing bracket in strlen call
The bracketing was causing heap overflow when trying to run the system
tests.
2019-05-06 13:50:18 +03:00
Esa Korhonen
31a6668420 Add PAM authenticator test
Both a normal PAM user and anonymous user mapping are tested.
2019-05-06 10:44:18 +03:00
Esa Korhonen
96b6acecff MXS-2427 Extend namedserverfilter test
Tests with two targets.
2019-05-06 10:31:51 +03:00
Johan Wikman
e9144219f5 MXS-2457 Add database firewall test 2019-05-03 13:38:12 +03:00
Johan Wikman
a3cf1d22c0 MXS-2457 Streamline logging 2019-05-03 13:38:12 +03:00
Johan Wikman
279edce16e MXS-2457 Add treat_string_as_field to firewall
Necessary if the firewall should be able to block columns when
'ANSI_QUOTES' as enabled and " instead of backticks are used.

Without this, the following

    > set @@sql_mode='ANSI_QUOTES';
    > select "ssn" from person;

will not be blocked if the database firewall has been configured
to block the column ssn.
2019-05-03 13:38:12 +03:00
Johan Wikman
5833c39a8a MXS-2457 Disable query classifier cache in masking
As the canonicalization is also not aware of 'ANSI_QUOTES', the
cache must be disabled if the masking filter has
'treat_string_arg_as_field' enabled.
2019-05-03 13:38:12 +03:00
Johan Wikman
4aa8eac799 MXS-2457 Allow strings to be treated as fields
Before this change, if the firewall was configured to block the use
of certain columns, it could be be bypassed simply by

        > set @@sql_mode='ANSI_QUOTES';
        > select "ssn" from person;

The reason is that as the query classifier is not aware of whether
'ANSI_QUOTES' is on or not, it will not know that what above appears
to be the string "ssn", actually is the field name `ssn`. Consequently,
the select will not be blocked and the result returned in cleartext.

It's now possible to instruct the query classifier to report all strings
as fields, which will prevent the above. However, it will also mean that
there may be false positives.
2019-05-03 13:38:12 +03:00
Johan Wikman
fe5160a714 MXS-2457 Add 'treat_string_arg_as_field' to DB Firewall 2019-05-03 13:38:12 +03:00
Johan Wikman
3fa1f0773e MXS-2457 Update test program 2019-05-03 13:38:12 +03:00
Johan Wikman
3a5a8b13b9 MXS-2457 Treat string args as fields
The masking filter will now consider all string arguments to
functions to be fields. This in order to prevent bypassing of
the masking with

    > set @@sql_mode='ANSI_QUOTES';
    > select concat("ssn") from masking;

This may lead to false positives, but no can do.
2019-05-03 13:38:12 +03:00
Johan Wikman
f09d46c8e6 MXS-2457 Allow string arguments to be treated as fields
Before this change, the masking could be bypassed simply by

    > set @@sql_mode='ANSI_QUOTES';
    > select concat("ssn") from person;

The reason is that as the query classifier is not aware of whether
'ANSI_QUOTES' is on or not, it will not know that what above appears
to be the string "ssn", actually is the field name `ssn`. Consequently,
the select will not be blocked and the result returned in cleartext.

It's now possible to instruct the query classifier to report all string
arguments of functions as fields, which will prevent the above. However,
it will also mean that there may be false positives.
2019-05-03 13:38:12 +03:00
Markus Mäkelä
09d04a09d4
Merge branch '2.2' into 2.3 2019-05-02 20:11:51 +03:00
Markus Mäkelä
0d61522586
Fix test_adminusers
The test did not remove old inet user password files.
2019-05-02 12:53:42 +03:00
Markus Mäkelä
33ef183a7f
Update maxctrl dependencies
This fixes some vulnerabilities reported by npm.
2019-05-02 12:31:35 +03:00
Timofey Turenko
753fa0552a MXS-2366: Fix RPATH setting for tarball
All RPATH setting have to be set before generation of any binary.
Defining of CMAKE_INSTALL_RPATH is moved to separate file which is called from main CMakeLists.txt in the beginning, just after install_layout.cmake
2019-04-30 14:18:33 +03:00
Esa Korhonen
dd188962cd MXS-2427 Check all hints when routing
Now considers other routing hints if first one fails. The order is inverted compared
to e.g. namedserver filter settings because of how routing hints are stored. If all hints
are unsuccessful, route to any slave.
2019-04-29 16:49:32 +03:00
Timofey Turenko
08bd7c99be Add a possibility to run tests under callgrind
Flag 'use_callgrind' make all maxscale-system-test run Maxscale under Valgrind with --tool=callgrind option
2019-04-26 17:30:10 +03:00
Markus Mäkelä
07ea6bd9ba
MXS-2450: Don't discard history if it's disabled
If the session command history is not enabled, it shouldn't be discarded
when a COM_CHANGE_USER is executed.
2019-04-25 11:49:01 +03:00
Andreas Krüger
7a5f11b752 Fix wrong check for wsrep_ready
wsrep_ready was check for ON/YES/1/true, but it has to be checked for OFF/NO/0/false as we are removing nodes, not joining.
2019-04-25 07:45:09 +03:00
Andreas Kruger
9f7a7e473e Enable galeramon to track wsrep_desync, wsrep_ready, wsrep_sst_donor_rejects_queries and wsrep_reject_queries 2019-04-25 07:45:09 +03:00
Esa Korhonen
b972d88bba Merge branch '2.2' into 2.3 2019-04-24 12:51:32 +03:00
Esa Korhonen
64a8288f66 MXS-2426 Document the change in cluster operation failure handling 2019-04-24 12:37:55 +03:00