Commit Graph

12642 Commits

Author SHA1 Message Date
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
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
4e3a581c94 Merge branch '2.2' into 2.3 2019-05-06 20:09:37 +03:00
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
31a6668420 Add PAM authenticator test
Both a normal PAM user and anonymous user mapping are tested.
2019-05-06 10:44:18 +03:00
96b6acecff MXS-2427 Extend namedserverfilter test
Tests with two targets.
2019-05-06 10:31:51 +03:00
e9144219f5 MXS-2457 Add database firewall test 2019-05-03 13:38:12 +03:00
a3cf1d22c0 MXS-2457 Streamline logging 2019-05-03 13:38:12 +03:00
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
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
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
fe5160a714 MXS-2457 Add 'treat_string_arg_as_field' to DB Firewall 2019-05-03 13:38:12 +03:00
3fa1f0773e MXS-2457 Update test program 2019-05-03 13:38:12 +03:00
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
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
09d04a09d4 Merge branch '2.2' into 2.3 2019-05-02 20:11:51 +03:00
0d61522586 Fix test_adminusers
The test did not remove old inet user password files.
2019-05-02 12:53:42 +03:00
33ef183a7f Update maxctrl dependencies
This fixes some vulnerabilities reported by npm.
2019-05-02 12:31:35 +03:00
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
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
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
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
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
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
b972d88bba Merge branch '2.2' into 2.3 2019-04-24 12:51:32 +03:00
64a8288f66 MXS-2426 Document the change in cluster operation failure handling 2019-04-24 12:37:55 +03:00
f8c964163f Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-04-23 13:46:53 +03:00
b7e9d8e189 remove maxscale-system-test/cnf/maxscale.cnf.template.replication.one_slave_big as soon as it is generated automatically 2019-04-23 12:33:23 +03:00
0f8b7450b1 Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-04-23 12:29:33 +03:00
be7f5ad1c8 remove maxscale-system-test/cnf/maxscale.cnf.template.replication_big as soon as it is generated automatically 2019-04-23 12:28:24 +03:00
a60e3c275c Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-04-23 12:24:58 +03:00
ba79028a46 Add debug assertions into the core
The assertions make sure DCB writes and reads are only done by the thread
that owns them.
2019-04-23 11:46:38 +03:00
f41ce6db16 Update maintenance version for 2.3 2019-04-23 11:20:38 +03:00
a8639c3226 Merge branch '2.3.6' into 2.3 2019-04-23 11:20:09 +03:00
2d8a93e88d Update 2.3.6 release date 2019-04-23 11:17:01 +03:00
7fc3527e1d Check for Docker in run_npm_test.sh
Lack of Docker can cause build failure
To avoid it if Docker is not available
test is not started, simply returns 0
It is hard to make Docker installation reliable especially for very old or very new distros
2019-04-18 12:10:24 +03:00
ddf9002e86 Add tests with big backend
Basic tests can be executed with 15 machines Master/slave backend. Tests have label BIG_REPL_BACKEND Default template modified to support big backend. Tests temporaraly labeled as UNSTABLE to prevent their execution nightly
For big test maxscale.cnf is automatically generated for any number of nodes
2019-04-18 09:48:39 +03:00
802a19879b Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-04-18 09:29:20 +03:00
f90863761e remove unneccesary __cxx11 2019-04-18 03:48:51 +03:00
4e2b6d6cb3 Add maxscale-system-test dependecies installation script 2019-04-18 03:44:02 +03:00
03dc969cf2 Fix use-after-free in LocalClient
If the DCB was closed before the handshake for the LocalCliet connection
was received, the gw_decode_mysql_server_handshake would use the closed
DCB to log the connection ID. Clearing out the pointer prevents it.
2019-04-17 16:33:27 +03:00
3e04922565 MXS-2415: Fix client callbacks in arvorouter
The DCB callbacks shouldn't be used to send more events as they cause the
callback to be called recursively. The recursive calls caused rows to be
sent before the schemas for the rows were sent. Queuing the events via the
worker mechanism prevents this.
2019-04-17 16:07:05 +03:00
61f728c05a MXS-2433: Reduce default query classifier cache size
Reduced the default cache size from 40% to 15%. Most cases don't benefit
from that much memory and the defaults have caused problems in live
environments.
2019-04-17 16:07:04 +03:00
d13e6e56ee MXS-2433: Never cache multi-packet queries
If a query spans more than a single packet, it will never be successfully
classified due to the fact that the complete SQL is never available to the
query classifier. For this reason, it is pointless to cache them.
2019-04-17 16:07:04 +03:00
aca3d65bbb MXS-2381: Add alter user
The `alter user` command makes password changes easier and keeps the usage
consistent across types in MaxScale.
2019-04-17 16:07:04 +03:00
b008c5a1e6 Add links to the sizes section
Links to the size type description in the documentation help explain what
sort of values are expected.
2019-04-17 14:10:48 +03:00
d77530a2a4 Use a known binlog name for Galera
The binlog files for Galera shouldn't rely on implicit naming simply due
to the fact that it logs a warning.
2019-04-17 13:32:21 +03:00
64e282f74b Fix config of mysqlmon_multimaster_serverid 2019-04-17 11:26:38 +03:00
163b3a2da5 Fix unhandled promise rejection in create monitor
If a monitor was created with an argument that was not a key-value type, a
promise would be rejected outside of the main maxctrl function. Added a
test case that covers this and fixed a few other test coverage problems
that were present.
2019-04-17 11:17:33 +03:00
cba23781e0 Remove deprecated Galera options
The Galera installation warns that the two removed options are deprecated.
2019-04-17 11:17:33 +03:00