12914 Commits

Author SHA1 Message Date
Johan Wikman
dabab543cc MXS-2684 Add throttling callbacks to backend DCB from pool
Add throttling callbacks to a backend DCB taken from the persistent
pool. They were removed when the dcb was put into the pool.
2019-09-17 14:45:53 +03:00
Johan Wikman
60c33b149c MXS-2674 Prevent read of unitialized variable 2019-09-16 09:32:47 +03:00
Johan Wikman
01ab0c8736 MXS-2553 Allow parenthesis around SELECT
With this change, a parenthesized top-level SELECT, such as
"(SELECT f FROM t)" will be fully parsed. Before this change,
the statement was classified as invalid and would thus have
been sent to the master.

With this change also statements like

    (SELECT f FROM t1) UNION (SELECT f FROM t2)

will be correctly classified, although only partially parsed.
2019-09-13 15:45:16 +03:00
Johan Wikman
7531515259 MXS-2674 Fix query classification
With these changes

  SET @saved_cs_client= @@character_set_client;

will be classified as QUERY_TYPE_USERVAR_WRITE and

  SELECT 1 AS c1 FROM t1 ORDER BY ( SELECT 1 AS c2 FROM
    t1 GROUP BY GREATEST(LAST_INSERT_ID(), t1.a) ORDER BY
      GREATEST(LAST_INSERT_ID(), t1.a) LIMIT 1);

will be classified as QUERY_TYPE_READ|QUERY_TYPE_MASTER_READ
2019-09-13 15:43:57 +03:00
Johan Wikman
9969f21414 MXS-2674 Add test that reveals bug 2019-09-13 15:31:06 +03:00
Johan Wikman
c079d1312e MXS-2674 Recognize timediff as builtin function 2019-09-12 12:38:57 +03:00
Esa Korhonen
ff2048625b MXS-2652 Add test
Test case added to an existing test.
2019-09-06 10:12:16 +03:00
Esa Korhonen
00feb61b23 MXS-2652 Do not clear maintenance flag when a server goes down
The set of flags to clear should be well-defined.
2019-09-06 09:43:32 +03:00
Johan Wikman
ea9a823a25 2.3: Add missing documentation link
Throttle filter was not linked from contents page.
2019-09-05 16:27:14 +03:00
Timofey Turenko
d82a90e27f Add read rights to /etc/my.cnf.d/* on test VMs
In some configs /etc/my.cnf.d/* files access rights are
very limited and server can not read configuration.
It leads to broken settings and unability to setup
replication during the test
2019-09-05 10:21:04 +03:00
Esa Korhonen
6edbd52324 MXS-2642 Do not re-test a pam-service for a given user
Because of how the user-data was read, the same service name could be
found multiple times if the user-search query matched multiple rows. Now
the service names are read to a set, which ignores duplicates. The same
service may be attempted again if the authentication fails and user-data
is fetched again.
2019-09-04 17:31:10 +03:00
Marko
7a1abc26d8 MXS-2631 Fix the ignoring of the system tables 2019-08-29 01:00:49 +03:00
Marko
cc038278d6 MXS-2631 Add system test 2019-08-29 01:00:49 +03:00
Esa Korhonen
72ce2d2bc1 MXS-2633 Fix PAM authentication support with server version 10.4
The new server pam plugin does not always send the first password prompt with the
AuthSwitchRequest-packet. In this case the server expects the client (MaxScale) to
just send the password immediately. MaxScale now checks the length of the packet,
sending the password if the packet is short. This works with both old and new server
versions.
2019-08-13 17:15:45 +03:00
Marko
5389e9e252 MXS-2592 Add documentation on session_trace 2019-08-09 19:36:24 +03:00
Marko
5899556d89 MXS-2592 Enable runtime configuration of session_trace 2019-08-09 19:36:24 +03:00
Markus Mäkelä
eda830c9f3
MXS-2609: Add master reconnection test case
The test case covers a few bugs that were fixed by the previous
commits. The first part of the test covers the case when master
reconnection fails while session command history is being executed. The
second part of the test makes sure exceeding the session command history
will prevent master reconnections from taking place.
2019-08-09 01:54:10 +03:00
Markus Mäkelä
1748e6599d
MXS-2609: Fix session command mixup on master failure
If a master failed during an ongoing session command history replay, it
would be treated as if a normal session command failed which would result
in the already executed session command being re-executed on all servers
at the wrong logical position.

To fix this, the history replay must be distinguished from normal session
command execution. When a connection replaying the history fails, the
query routing simply needs to be attempted again.
2019-08-09 01:54:09 +03:00
Markus Mäkelä
547236b7a4
MXS-2609: Store history size in Backend
When a connection is created, the size of the history that is about to be
replayed is known. Storing this and decrementing it each time a session
command is completed tells us when the Backend has finished replaying the
session command history. This can then be used to distinguish whether a
session command executed on a master should be retried or whether to
simply discard the connection.
2019-08-09 01:54:09 +03:00
Markus Mäkelä
8bc4e42f2d
Fix query queuing on session command execution
If session command execution during server reconnection caused a query to
be queued, the query would be put on the tail end of the queue. This would
cause queries to be reordered if the queue wasn't empty. The correct thing
to do would be to put the next pending query back at the front of the
queue.
2019-08-09 01:54:09 +03:00
Markus Mäkelä
bb6f9213d4
Fix debug assert on master reconnection
If a master reconnection occurred after the session command history was
disabled due to the limit being exceeded, a debug assertion would be hit
in prepare_target. This assert makes sure that a connection can be safely
created to the server which means that in release mode builds the session
state would be inconsistent on the new master.

As this is an unrecoverable situation, the session should stop immediately
even if delayed_retry is enabled. Currently the session will continue
until the delayed retry timeout is hit. This happens due to the fact that
the delayed retry mechanism handles all errors in a similar way.
2019-08-09 01:54:09 +03:00
Markus Mäkelä
9f6efef67a
MXS-2576: Update states atomically in csmon
This prevents false transient states from occurring.
2019-08-09 01:54:09 +03:00
Timofey Turenko
ab429c3202 Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-08-08 23:12:16 +03:00
Timofey Turenko
284e5db68b Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-08-08 23:11:44 +03:00
Timofey Turenko
910990115c add Docker to build VM temlates
Now Docker is installed to VM which are used to build Maxscale. It allows to run tests which require Docker without installing it
during build process.
2019-08-08 16:58:07 +03:00
Johan Wikman
2f40190555 Merge branch '2.2' into 2.3 2019-08-08 08:07:37 +03:00
Timofey Turenko
1ca15714f8 fix sles link creation 2019-08-07 20:06:31 +03:00
Timofey Turenko
2b0fe14676 fix sles link creation 2019-08-07 19:45:52 +03:00
Timofey Turenko
169fb256ed Create symlink for sles15
Currently build is executed for OpenSuse 15 and SLES15 repo is not available. To avoid
missing repo symlink sles -> opensuse is created
2019-08-07 16:02:40 +03:00
Timofey Turenko
bb43e6193e fix typo in copy_repos.sh 2019-08-07 16:00:12 +03:00
Timofey Turenko
5d0112c397 add sles directory creation 2019-08-07 15:41:18 +03:00
Timofey Turenko
2fa336d142 create symlink for sles15 2019-08-07 14:58:19 +03:00
Timofey Turenko
e2400f5799 Add scripts to create repository with all minor versions
Some users need repository with all versions of Maxscale for easy version selection and downgrating
2019-08-07 14:46:02 +03:00
Markus Mäkelä
fd72332ea4
Improve master failure error message
The message will now always contain the server name.
2019-08-05 12:48:19 +03:00
Johan Wikman
84a1578f4b Merge branch '2.3.11' into 2.3 2019-08-02 15:50:07 +03:00
Johan Wikman
f8150b776c Update 2.3.11 release date 2019-08-02 15:46:03 +03:00
Johan Wikman
83db2a4dc1 Update 2.3 maintenance release number 2019-08-02 09:54:27 +03:00
Johan Wikman
3635592228 Add 2.3.11 release notes and update 2.3 change log 2019-08-02 09:50:01 +03:00
Johan Wikman
110bc32b25 MXS-2621 Fix broken authorization SQL 2019-08-02 09:48:14 +03:00
Markus Mäkelä
15461c1f8e
MXS-2621: Add test case
The test reproduces the problem with lower_case_table_names.
2019-08-02 09:47:42 +03:00
Markus Mäkelä
527f9d3136
Rewrite open_close_connections
The test now uses standard library threads and lambda functions to make
the code simpler. Also made the test more robust by ignoring any errors
that are caused by the exhaustion of available client side TCP ports.
2019-08-01 16:50:19 +03:00
Johan Wikman
56fe86115a Merge branch '2.3.10' into 2.3 2019-08-01 16:08:27 +03:00
Johan Wikman
e1a730ed86 Update release date for 2.3.10 2019-08-01 16:06:26 +03:00
Johan Wikman
f06c2cbdaa Merge branch '2.3.10' into 2.3 2019-08-01 10:02:54 +03:00
Johan Wikman
8347a48b64 Update 2.3 maintance release 2019-08-01 08:32:30 +03:00
Johan Wikman
18169a17d9 Update 2.3 changelog and add 2.3.10 release notes 2019-08-01 08:24:57 +03:00
Johan Wikman
c592328ea2 MXS-2613 Access correct argument
The cache show-command accessed the wrong argument. That is why

    [maxadmin|maxctrl] call command cache show TheCache

did not work.
2019-07-30 12:29:01 +03:00
Marko
3ddcc49288 MXS-2592 Use the correct log level variable 2019-07-29 12:07:02 +03:00
Markus Mäkelä
dda02b45ee
MXS-2520: Do master replacement if it's possible
This allows a new master to be chosen regardless of the target server
type.
2019-07-29 10:26:30 +03:00
Marko
918a2964d5 MXS-2592 Add configuration for session specific in-memory log
When enabled each session will write log messages in the in-memory log.
If session ends in error this log is written to the actual log in disk.
2019-07-28 20:56:22 +03:00