12729 Commits

Author SHA1 Message Date
Johan Wikman
c68cb788cc MXS-2552 Update DISK plugin documentation 2019-06-11 13:21:17 +03:00
Esa Korhonen
57029bb1a1 MXS-2445 Add logrotate config file 2019-06-10 12:51:03 +03:00
Esa Korhonen
1ba77b59e2 MXS-2548 Show correct monitor state in "maxadmin list monitors"
The code OR:d with 0.
2019-06-06 17:09:41 +03:00
Esa Korhonen
65975a38e2 Add test for MXS-2355
The test attempts to log in using mysql_clear_password.
2019-06-06 16:36:36 +03:00
Timofey Turenko
0469d57ede Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-06-05 14:53:28 +03:00
Johan Wikman
f0c4fd5723 MXS-2250 Add test that reveals the problem
Before the MXS-2250 fix, the following ends with an error:

    CREATE TEMPORARY TABLE t (f INT);
    DESCRIBE t;

Reason is that the first is sent to the master (and the table will
not be replicated to slaves) and the latter to some slave.
2019-06-05 14:29:30 +03:00
Johan Wikman
b8d601aab2 MXS-2250 Reveal table information for 'DESCRIBE tbl'
When a statement like 'DESCRIBE tbl' is classified, the table
name will now be available so that a router can check whether the
table is a temporary one. In that case, the statement must be sent
to the master.
2019-06-05 14:28:45 +03:00
Timofey Turenko
16005c452e run create_user* under sudo 2019-06-05 13:42:39 +03:00
Timofey Turenko
de978be955 remove '-u root' from create_user*.sh
Call of MariaDB client from local machine with sudo with '-u root' parameter
does not work with 10.4
2019-06-05 12:57:46 +03:00
Markus Mäkelä
c219187a1e
Merge branch '2.2' into 2.3 2019-06-03 13:27:57 +03:00
Esa Korhonen
5a5d625b15 Update MariaDBMonitor and PAM authenticator documentation 2019-06-03 12:15:13 +03:00
Markus Mäkelä
d68f66fede
MXS-2538: Send master charset in the handshake packet
By iterating over the servers and sending the master's charset we are
guaranteed a "known good" charset. This also solves the problem where a
deactivated server reference would be used as the charset and server
version source.
2019-05-31 23:01:18 +03:00
Markus Mäkelä
d88846fab4
MXS-2515: Add KILL QUERY test case
The test checks that queries are killed properly.
2019-05-31 14:01:16 +03:00
Markus Mäkelä
e9c652555d
MXS-2538: Fix hang on unknown KILL
Unknown KILL commands are now forwarded as-is to the routers.
2019-05-31 14:01:16 +03:00
Markus Mäkelä
220fea3546
MXS-2464: Retry failed session commands
If the execution of a session command fails on a master, it is retried
again. If the master is not available, the response will be returned from
one of the slaves.
2019-05-31 14:01:15 +03:00
Markus Mäkelä
6d089e3283
Clear session commands in Backend::close
If a reconnection would take place, the old commands would get executed.
2019-05-31 14:01:15 +03:00
Markus Mäkelä
cb089f69e6
Add read retry assertion
The retrying of a read on a slave should only be done when the failing
server is waiting for a result and it was the last server from which a
result was expected.
2019-05-31 14:01:15 +03:00
Markus Mäkelä
625740e69d
MXS-2464: Fix crash on failed session command
If the master fails when a session command is being executed with
delayed_retry enabled, a null query would get placed into the query
queue. This change simply prevents the crash and closes the session even
though the query could be retried.
2019-05-31 14:01:15 +03:00
Markus Mäkelä
13b258a151
MXS-2464: Add test case
The bug appears when a session command that is executed on the master
fails. The logic in the code doesn't take this case into consideration
when it processes failed connections.
2019-05-31 14:01:15 +03:00
Markus Mäkelä
9481992bb9
Fix dbfwfilter release mode build failure
GCC 9 complained about null format strings even though the argument given
was never null.
2019-05-31 14:01:15 +03:00
Markus Mäkelä
d5e8315290
Assert that buffers are non-null in mysql.h
The functions assume that the buffer is never null and thus should be
asserted.
2019-05-31 14:01:15 +03:00
Markus Mäkelä
a4ee390fe5
Never construct mxs::Buffer from nullptr
A mxs::Buffer should never be constructed from a null pointer and if done,
it is very likely due to an error.
2019-05-31 14:01:15 +03:00
Markus Mäkelä
9df6c9aeca
Fix weightby documentation
The parameter names were different.
2019-05-31 14:01:15 +03:00
Markus Mäkelä
47ae75c6a5
Make MXS_COM_UNDEFINED a part of the enum
This way it is a valid enum value and it prevents UBSAN from complaining
about it.
2019-05-31 14:01:14 +03:00
Markus Mäkelä
4e6ca33053
Add UBSAN flag to builds
The -DWITH_UBSAN flag enables the undefined behavior detection provided by
GCC.
2019-05-31 14:01:14 +03:00
Markus Mäkelä
ee7e63a611
MXS-2464: Assert that responses are expected
A query should not be queued if no responses are expected. The code that
executes queued queries should be dead code and this assertion would catch
it.
2019-05-31 14:01:14 +03:00
Markus Mäkelä
1012b95544
Merge branch '2.2' into 2.3 2019-05-31 12:40:15 +03:00
Markus Mäkelä
2b3a9b2b57
Initialize MXS_SESSION::autocommit 2019-05-29 18:46:33 +03:00
Markus Mäkelä
ed63493875
Return valid values for undefined mdbci variables
If a variable is not defined in the network configuration, a valid value
is returned.
2019-05-29 18:46:33 +03:00
Markus Mäkelä
84986dbf92
MXS-2520: Add test case
The test reproduces the problem and verifies that the fix works.
2019-05-29 18:46:33 +03:00
Markus Mäkelä
81254953d1
MXS-2520: Allow master reconnection on reads
If only the master is available and a reconnection must take place, it
must be allowed to happen in all cases.
2019-05-29 18:46:33 +03:00
Esa Korhonen
442d8bed9a MXS-2479 Add username and host to PAM authenticator log messages 2019-05-29 17:32:27 +03:00
Markus Mäkelä
114e095e1b
MXS-2525: Fix non-plugin authentication
Older clients assume the plugin used for authentication is
mysql_native_password. If the client doesn't request plugin
authentication, don't treat it as an error.
2019-05-29 12:41:53 +03:00
Markus Mäkelä
dcdcc0e44f
Fix avrorouter build failure
Signed to unsigned comparison.
2019-05-28 15:18:34 +03:00
Markus Mäkelä
bef8881cab
Merge branch '2.2' into 2.3 2019-05-28 14:17:43 +03:00
Markus Mäkelä
edb669100d
MXS-2511: Update connector-c
Updated to 3.0.10.
2019-05-28 14:00:28 +03:00
Esa Korhonen
4d3d6e9d06 MXS-2479 Extend pam authenticator test to use a customized pam service
The test now covers additional messages being sent by the pam api.
2019-05-28 11:04:53 +03:00
Esa Korhonen
d128c9a09b MXS-2504 Kick out super-users from master server during switchover
The monitor queries for logged in users with super-privileges and kicks them out to
prevent writes to master. Normal users can stay since their writes are prevented by
read_only. Also, the master-status is removed from the master manually to signal to
routers that no more writes should go to master.
2019-05-27 18:11:46 +03:00
Markus Mäkelä
3721d6abf2
MXS-2507: Check stored integer size
If the avro block is smaller than the size of the stored data, the file
was created with a block size that was too small. Even the reference Avro
implementation can't read the file in this case.
2019-05-27 15:07:35 +03:00
Markus Mäkelä
387bf0ccc2
MXS-2507: Fix avrorouter token processing
The token comparison function did the comparison wrong: The token needs to
be an exact match instead of a partial one.
2019-05-27 09:34:38 +03:00
Markus Mäkelä
05ed272c16
Fix format-truncation warnings in blr
The custom message must be smaller than the actual message to guarantee no
truncation takes place.
2019-05-27 03:24:05 +03:00
Markus Mäkelä
eda547c86f
MXS-1851: Add hard-coded protocol module check
This way a hard to track crash is avoided and the user knows how to fix
it.
2019-05-24 13:55:43 +03:00
Esa Korhonen
a1697e2aa6 MXS-2479 PAMBackendAuth is more tolerant of extra messages.
The authenticator can now receive additional questions from the server even
after the original password-query.
2019-05-24 11:31:55 +03:00
Esa Korhonen
bd8aa64547 MXS-2479 Accept additional messages in PAM authenticator
Plugins may send additional messages during authentication. These messages
often contain notifications such as password expiration dates. Both the client
and backend side authenticators now handle such messages. The messages are not
sent to the user, only the log. The requirement that only "Password: " is queried
still stands.
2019-05-23 14:14:25 +03:00
Markus Mäkelä
8317fec745
MXS-2496: Check for ALL PRIVILEGES grant
If a user has ALL PRIVILEGES as a global privilege, it overshadows the
SHOW DATABASES grant.
2019-05-22 09:56:35 +03:00
Markus Mäkelä
365efb9d3a
Ignore SIGHUP termination in ssh_node
Sometimes the command appears to complete and terminate with a SIGHUP
instead of the proper return value.
2019-05-22 09:56:35 +03:00
Markus Mäkelä
b294acf276
MXS-2496: Fix SHOW DATABASES grant check
The code expected that the grant was given to the actual user, not a role.
2019-05-21 13:43:51 +03:00
Timofey Turenko
6e6ab07642 Make .ssh/id_rsa.pub default source of public keys for VMs
'build' and 'run_test' copies public ssh keys to all created VMs
Legacy code takes keys from different locations, e.g. ~/build-scripts/team_keys which
causes errors due to lack of such files.
Now public keys goes from file defined on  or if not defined
from .ssh/id_rsa.pub of current host machine
2019-05-21 13:21:23 +03:00
Esa Korhonen
bb706394f6 MXS-2473 Simplify regular expression settings documentation
The settings "match", "exclude" and "options" are now explained once
in the general documentation. The individual filter documentation refers
to the general explanation.
2019-05-20 11:18:03 +03:00
Markus Mäkelä
96a477ec89
MXS-2490: Send error to client on unknown PS handle
If a client requests an unknown binary protocol prepared statement handle,
a custom error shows the actual ID used instead of the "empty" ID of 0
that the backend sends.
2019-05-17 14:13:44 +03:00