13556 Commits

Author SHA1 Message Date
Niclas Antti
6a5d36e4bd MXS-2485 Handle COM_STATISTICS and COM_STMT_FETCH. Rearrange a bit. 2019-06-05 20:05:29 +03:00
Johan Wikman
ba60b92612 Merge branch '2.3' into develop 2019-06-05 14:48:43 +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
Johan Wikman
8fa8181009 MXS-2540 Use new conf. mech. in Clustrix monitor 2019-06-05 11:10:28 +03:00
Johan Wikman
ceb58d615e MXS-2540 Add monitor support to new config system
The configuration system needs to be aware of standard monitor
parameters.
2019-06-05 11:10:28 +03:00
Johan Wikman
69dea5a81e MXS-2537 Turn 'cluster_monitor_interval' into duration 2019-06-05 11:02:34 +03:00
Johan Wikman
62a9d4f8c1 MXS-2524 Add MaxScale Clustrix tutorial 2019-06-05 11:00:19 +03:00
Esa Korhonen
4ed154d07f Create ExternalCmd during monitor configuration
The command object need not be recreated every time it's ran.
2019-06-04 14:55:09 +03:00
Esa Korhonen
4b69156875 Simplify external command script substitution
The command script is now stored in string form. Substitution is performed
using normal string methods instead of regular expressions, since all used
substitutions are simple string replacements. Tokenization is performed after
substitution.
2019-06-04 14:55:09 +03:00
Markus Mäkelä
44d1b821c3
Merge branch '2.3' into develop 2019-06-03 13:54:55 +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
Esa Korhonen
625741d8ba Remove unused fields from ExternalCmd
Also other cleanup.
2019-06-03 10:16:56 +03:00
Esa Korhonen
e849bf261b Move ExternalCmd-functions to class methods 2019-06-03 10:16:56 +03:00
Marko
ba13692032 MXS-2477 Extend the example to show more use cases 2019-06-02 19:20:35 +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
Johan Wikman
b635cc92ab MXS-1783 Add 10.4 support
qc_mysqlembedded can now be built using the embedded library from
MariaDB 10.4.
2019-05-31 15:12:57 +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
Johan Wikman
de3c5721e9 MXS-2513 Deprecate firewall and masking filters 2019-05-31 11:53:36 +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
3b60bf00e1 Merge branch '2.3' into develop 2019-05-29 18:41:50 +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ä
32769ddfb0
Fix maxavro build failure 2019-05-29 10:57:38 +03:00
Markus Mäkelä
2ddc20cf9e
Merge branch '2.3' into develop 2019-05-28 15:19:10 +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ä
65c795164c
Merge branch '2.3' into develop 2019-05-28 14:40:45 +03:00
Markus Mäkelä
006b87cebe
MXS-2307: Extend alter test cases
The tests now check that multiple parameters work as expected. Also fixed
a few defects found while writing the tests, namely the fact that null or
empty values weren't detected.
2019-05-28 14:34:51 +03:00
Markus Mäkelä
3a9bfa380e
MXS-2307: Allow multi-parameter updates
Multiple parameters can now be updated with a single call in MaxCtrl. This
makes alterations more convenient and prevents intermediate states when
multiple parameters are changed at the same time. The changes are
backwards compatible so it should not affect existing programs.
2019-05-28 14:34:51 +03:00
Markus Mäkelä
954c1157dc
MXS-2483: Add note to set_context documentation
As the function is required by the binlogrouter, we cannot outright remove
it without refactoring how the servers are handled in it.
2019-05-28 14:34:51 +03:00
Markus Mäkelä
0462ac3d16
MXS-2483: Update documentation and release notes
Updated documentation on how servers with TLS are created.
2019-05-28 14:34:51 +03:00
Markus Mäkelä
21cdc4822b
MXS-2483: Remove runtime enabling of TLS
TLS can no longer be enabled at runtime via maxadmin.
2019-05-28 14:34:50 +03:00