Commit Graph

5678 Commits

Author SHA1 Message Date
cf46004bd8 Make the servers-array in Monitor private
This prevents derived classes from modifying the array directly,
which would be unsafe.
2019-05-21 10:58:24 +03:00
76399200f4 Fix assertion on client SSL read
When SSL is enabled, the protocol seems to get zero byte reads which
result in a null GWBUF being passed to gwbuf_length.
2019-05-20 15:46:52 +03:00
e5a49a2f7b MXS-2483: Take SSLContext into use in binlogrouter 2019-05-20 15:45:19 +03:00
82add11e86 MXS-2483: Take SSLContext into use
SSLContext is now used everywhere except the binlogrouter which still
allocates the contexts itself. Fixing the binlogrouter's misuse of
internal structures is a rather large undertaking and for this reason the
SSLContext will be taken into use there in a separate commit.
2019-05-20 15:45:18 +03:00
1197bd40db MXS-2483: Move unwanted SSL code to mysql_client.cc
The code was only used by mysql_client.cc and should therefore be located
in it.
2019-05-20 15:45:18 +03:00
cab336ed89 MXS-2483: Rename SSL_LISTENER to mxs::SSLContext 2019-05-20 15:45:18 +03:00
650230455a MXS-2169 Allow unsafe failover when 'enforce_simple_topology' is on
If gtid of master is unknown (as is typical when master is down when MaxScale
starts) the domain id is guessed from the slaves instead. This is usually
safe.
2019-05-20 10:43:54 +03:00
0f714e9ad4 MXS-2495 Cleanup GWBUF interface
All GWBUF macros that address a single link in a chain are now
simple wrappers for equivalent gwbuf_link-functions.

Next step is to drop the macros and replace their use with calls
to the functions.
2019-05-20 09:57:37 +03:00
d1affba34d MXS-2480 Add log message about opened SQLite database 2019-05-20 09:11:58 +03:00
004e8e638f MXS-2480 Fix creating of the in memory sqlite3 databases in PAMAuth
SQLITE_OPEN_URI flag was missing causing the databases to be created in
disk instead of in memory. Also added info level log message from created
database in clustrixmonitor.
2019-05-20 09:11:58 +03:00
5828061321 Merge branch '2.3' into develop 2019-05-17 14:39:30 +03:00
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
f94355770f Merge branch '2.2' into 2.3 2019-05-17 14:10:28 +03:00
4ee30f5c52 MXS-2169 Allow a downed server to be selected as topology master
This is required for the case when MaxScale is started when the master is
already down.
2019-05-17 13:46:33 +03:00
d2f3e56d0a MXS-2169 Add 'enforce_simple_topology'-setting
Does not add any functionality yet.
2019-05-17 13:46:33 +03:00
c801789ff3 Cleanup monitor running state 2019-05-17 13:34:48 +03:00
08b4c26652 Monitor types and fields cleanup
Moves some enums to class enums. Moves some free functions to class methods.
2019-05-17 13:34:48 +03:00
bf63698991 MXS-2464: Bring back the runtime query queue check
The code that checked that only non-empty queries are stored in the query
queue was left out when the query queue fix was backported to 2.3. Since
MXS-2464 is caused by a still unknown bug, the runtime check should help
figure out in which cases the problem occurs.
2019-05-17 13:03:03 +03:00
2cd4da32a7 MXS-2494: Fix user loading queries for MariaDB 10.1+
The queries now properly check for the plugin.
2019-05-16 10:41:04 +03:00
0ee985758e Fix test_binlogrouter
The MySQL... -> MariaDB.. name change required some modifications.
2019-05-14 15:23:08 +03:00
5b3dbdbf16 Fix test_cacheoptions and test_dbfwfilter
Due to listener changes we cannot just keep on creating new
listeners with the same port over and over again.

Easiest to simply use a different port each time.
2019-05-14 15:01:15 +03:00
4ed8726ccf Fix merge bug 2019-05-14 14:01:16 +03:00
17d3beba3b MXS-2385 Fix the problem with the USE command and tpmfilter
Trying to get the type mask of the QWBUF caused debug assertion in the query
classifier when using some commands. Now type mask is checked only when the
buffer contains MXS_COM_QUERY command.
2019-05-14 13:40:37 +03:00
c09617cd82 Merge branch '2.3' into develop 2019-05-14 12:33:50 +03:00
22a9e20f1f MXS-1957 Change the default authenticators to MariaDB aliases
Using MySQLAuth or MySQLBackendAuth causes warning to be logged.
2019-05-13 15:35:09 +03:00
50fef6f361 MXS-1957 Add MariaDBAuth alias 2019-05-13 15:35:09 +03:00
9810c5fa69 MXS-1957 Add MariaDBBackendAuth alias 2019-05-13 15:35:09 +03:00
476dc80bc9 Move settings shared between MariaDBMonitor and MariaDBServer to container
Removes the need to communicate these settings via call parameters.
2019-05-10 14:48:41 +03:00
d10c7a4140 Rearrange MariaDB-Monitor settings variables
Moves some of the settings to a dedicated container to separate them
from other fields.
2019-05-10 14:48:41 +03:00
a9b1e3a442 Move some Monitor fields to private and protected
None of the fields should be publicly writable and some should not even
be writable from derived classes.
2019-05-10 14:48:41 +03:00
a3bb61486d Move server_set_status and server_clear_status to monitor
The operation goes through monitor code so should be in the according file.
2019-05-10 14:37:35 +03:00
b0d8535ead Allow master changes at transaction start
When a BEGIN statement is being executed without a master connection but
when one can be created, the BEGIN statement would be treated as if a
transaction was already open. Since the statement only starts the
transaction, it is allowed to be routed to a "new" master regardless of
the transaction statem.

This fixes the failure to start a transaction when lazy_connect is
enabled.
2019-05-10 13:20:33 +03:00
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
603eac9cf8 Fix build failures
Narrowing type conversions in schemarouter and avrorouter.
2019-05-10 10:37:52 +03:00
fbd61967a7 Format filters 2019-05-10 10:31:12 +03:00
418ccf861d Format routers and monitors 2019-05-10 10:31:12 +03:00
6625c1296b Format authenticator and protocol modules 2019-05-10 10:31:12 +03:00
0d13e694e4 Merge branch '2.3' into develop 2019-05-10 09:28:39 +03:00
50b5fe76ef Pass parameters as const ref to server_alloc 2019-05-10 09:21:52 +03:00
31ce757f8d Don't attempt TLS with maxscaled protocol
The authenticator doesn't support it so it is pointess to try it.
2019-05-10 09:21:52 +03:00
3813c728b1 Move listener parameter handling into Listener::create
The Listener::create method now takes a set of configuration parameters
from which it constructs a listener. This removes the duplicated code and
makes the behavior of listener creation similar to other objects in
MaxScale. It also allows the configuration parameters to be stored in the
listener object itself.
2019-05-10 09:21:52 +03:00
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
23a09a6294 MXS-2455 Use mxb::Buffer::iterator
Simplifies the code and as extra allocations etc. are only
made when info is enabled, and can thus be ignored.
2019-05-09 15:04:03 +03:00
381940ce8c Merge branch '2.3' into develop 2019-05-09 14:35:44 +03:00
567ad9b8b8 Fix galeramon regression
The comparisons were wrong: strcasecmp returns 0 for equal strings.
2019-05-09 12:30:29 +03:00
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
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
0e0342e657 Merge branch '2.3' into develop 2019-05-08 10:38:39 +03:00
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
bad96e411a Merge branch '2.3' into develop 2019-05-08 10:30:58 +03:00