Commit Graph

12796 Commits

Author SHA1 Message Date
42c37585f4 Throttle query retry attempts
It was possible that a one-second outage that caused immediate rejection
of network connections would cause all of the query retry attempts to fail
within a very short period of time. By preventing rapid reconnections,
query_retries is more effective as an error filtering mechanism.
2019-06-28 09:27:20 +03:00
d8790fa3e7 Merge branch '2.2' into 2.3 2019-06-27 14:20:42 +03:00
7d3c25200e Merge branch '2.2' into 2.3 2019-06-27 14:10:48 +03:00
b4289224de Avoid using SQLITE_OPEN_URI
Centos6 uses a very old version of SQLite without support for URI filenames.
PAM authenticator must use a file-based database.
2019-06-27 13:59:05 +03:00
8a749dc627 MXS-2521: Fix build failure
The get_target_type signature for the definition was different from the
declaration.
2019-06-27 12:48:03 +03:00
5eba688c1b MXS-2521: Detect COM_STMT_EXECUTE without metadata
If a COM_STMT_EXECUTE has no metadata in it and it has more than one
parameter, it must be routed to the same backend where the previous
COM_STMT_EXECUTE with the same ID was routed to. This prevents MDEV-19811
that is triggered by MaxScale routing the queries to different backends.
2019-06-27 08:29:30 +03:00
a6617f52fc MXS-2578: Remove installation of /var/lib/maxscale
The directory was installed as the root user but later on in the
installation process the owner would be changed to the maxscale user. This
causes some validation programs to fail as they expect installed files to
retain the original ownership.
2019-06-27 08:25:12 +03:00
83e276ebd3 MXS-2521: Fix the test
Fixed the test to correctly set the parameters and also to first verify
that a direct connection works before doing the test via MaxScale.
2019-06-27 08:25:12 +03:00
2e843375bb Merge branch '2.2' into 2.3 2019-06-27 08:19:47 +03:00
5c762bb841 misc fix 2019-06-27 08:17:42 +03:00
51ce3c53fd shift 32 2019-06-27 08:17:42 +03:00
6b31b80e76 fix wrong assert 2019-06-27 08:17:42 +03:00
8d50450b5a MXS-2521:Route subseqenct COM_STMT_EXECUTE to the same server which first COM_STMT_EXECUTE was executed on 2019-06-27 08:17:42 +03:00
25a076d072 Fix buffer sizes in PS extraction code
The code used 4 byte buffers for 2 byte values.
2019-06-26 15:49:50 +03:00
991067372d Improve systemd check error message
The error now displays the correct package name for systems that use RPMs.
2019-06-26 15:49:50 +03:00
6cc0d43cb2 Merge branch '2.2' into 2.3 2019-06-26 10:10:26 +03:00
67d82146f1 Fix packet length assertion
The `used_len + len` can be the same as `total_len`.
2019-06-26 09:19:24 +03:00
88dae197b0 Make packet boundary assertion less costly
mxs::Buffer::iterator is not a random-access iterator and hence will have
linear cost. This is too costly to do on every packet with even moderately
sized resultsets.
2019-06-26 09:13:03 +03:00
d15582d26d Allow posting to stopped workers
Due to there being no distinction between a temporarily stopped worker and
a permanently stopped one, we must allow posting of messages to stopped
workers.
2019-06-25 17:32:24 +03:00
d8cbdae83d Remove 2.2 release notes from 2.3 branch
By convention, we only retain the release notes for the current
branch.
2019-06-25 11:46:30 +03:00
42bf95eb82 Fix MariaDB startup commands
Newer systems only define the mariadb service.
2019-06-25 10:15:06 +03:00
873ea92915 Assert that packet is inside the buffer
The buffer containing the response should contain only complete packets.
2019-06-25 09:05:49 +03:00
a51e094cd5 Merge branch '2.2' into 2.3 2019-06-24 15:07:18 +03:00
7fb268f1a7 MXS-2575: Fix REST-API error propagation
The errors are now correctly sent even with requests that upload data.
2019-06-24 14:37:40 +03:00
7117ab4719 MXS-2574: Prevent alterations to current user
Due to the fact that the alteration is emulated by deletion and creation
of the user in question, the current user cannot be altered.
2019-06-24 13:06:40 +03:00
9d06ff8402 Cleanup basic tutorials
Rephrased some of the text. Moved some parts to the general tutorial to avoid
repeating it in the two specialized tutorials.
2019-06-24 12:41:10 +03:00
5f3ff7d1be MXS-2521: Add test case
The test case doesn't reproduce the problem due to MDEV-19811 getting in
the way but it is likely to reproduce it once that bug has been avoided.
2019-06-24 12:33:49 +03:00
f9eef8f44c Fix configuration guide documentation
Fixed limitations section, the heading depths and the document name,
corrected localhost_match_wildcard_host, added deprecation notes where
required.
2019-06-24 12:32:58 +03:00
dbc321cbbe Merge branch '2.2' into 2.3 2019-06-24 12:20:19 +03:00
1cb13582ff Fix worker state debug assertion
Stopped workers will receive messages.
2019-06-24 11:03:50 +03:00
be429c2c57 MXS-2490: Always restore original statement ID
By always restoring the ID, we are guaranteed to only store the query in
the form that it was originally sent in. This should be changed so that
the ID that the client sends can be used as-is in the backends.
2019-06-20 14:27:04 +03:00
805be70a78 Add more information to rwsplit info messages
The statement ID for all binary protocol statements and the error given to
handleError are now logged.
2019-06-20 14:27:03 +03:00
301b1b63ab MXS-2569: Always terminate schemas with newlines
If the stored file didn't have a newline in the schema, the schema and the
first row would be on the same line.
2019-06-20 12:32:30 +03:00
7673ee685d Distinguish stopped and finished workers
By having a separate FINISHED state and a STOPPED state, it is possible to
know at which point in the worker's lifetime an event is done. Posting of
messages before a worker is started is allowed but posting them after the
worker has stopped is not.

This fixes avrorouter related failures and all other failures that stem
from worker messages being ignored at startup.
2019-06-20 12:32:30 +03:00
dd944c7302 MXS-2568: Always enable LOCAL INFILE for testing
The automatic detection of LOCAL INFILE added in connector-c 3.0.9
requires that the option is enabled explicitly.
2019-06-20 12:32:30 +03:00
39df829384 Don't kick out super-users when performing rejoin
When rejoining a server, preventing writes is not as essential as in switchover.
2019-06-19 17:14:39 +03:00
3d8475f8ed Merge branch '2.2' into 2.3 2019-06-19 12:37:23 +03:00
35b5f2099b Regenerate MaxCtrl documentation 2019-06-19 10:44:16 +03:00
96d5c575f8 Document required create service parameters
When a service is created via MaxCtrl, the `user` and `password`
parameters must be defined. This was not documented in the command help
output.
2019-06-19 10:44:16 +03:00
27fb397041 MXS-2547: Do shutdown on main worker
By stopping the REST API before the workers and moving the shutdown to the
same worker that handles REST API requests, we prevent the hang on
shutdown. This also makes the signal handler signal-safe.
2019-06-19 10:31:47 +03:00
69b3879357 MXS-2547: Don't post messages to stopped workers
If a worker has been stopped, tasks must not be executed on it. To prevent
this, the calling code should check whether the worker has been
stopped. This does not prevent the case where a message is successfully
posted to a worker but the worker is stopped before it processes it.
2019-06-19 10:31:47 +03:00
b7294a28af MXS-2547: Assert that workers aren't stopped
If a worker is stopped, none of the Worker::execute or post_message
methods should be called.
2019-06-19 10:31:47 +03:00
a60bd37610 MXS-2367 Print slave connection errors when replication fails
The slave connection I/O-tread stays running if replication credentials are
wrong when connecting to master. This causes a switchover/failover timeout.
When this happens, print the error in the slave connection status as this
clarifies the problem to the user.
2019-06-18 15:02:21 +03:00
6cbe9d1258 MXS-2550: Fix default module parameters
The parameters weren't processed when they were added from the module
defaults.
2019-06-18 07:06:51 +03:00
372c9a8350 Fix configuration guide documentation
Fixed limitations section, the heading depths and the document name,
corrected localhost_match_wildcard_host, added deprecation notes where
required.
2019-06-17 14:07:52 +03:00
002281599e MXS-2563: Add test case
Added a test case that reproduces the debug assertion with the old code
and verifies that it is fixed with the new one.
2019-06-17 14:07:52 +03:00
f6a5b59067 MXS-2563: Fix query retrying on slave failure
If one slave is executing a query while another one is executing a session
command and the one that is executing the session command fails, the
ongoing query would get retried even though the server that failed was not
executing it. If the server was executing a session command, nothing needs
to be done.
2019-06-17 14:07:52 +03:00
cf866a6a57 Merge branch '2.2' into 2.3 2019-06-14 10:49:51 +03:00
2accfad329 Handle trailing unexpected ERR packets
RWBackend did not expect that a resultset and an unexpected ERR packet
could be stored in the same buffer. This can happen for example if a
server shuts down immediately after the resultset is sent.
2019-06-14 08:12:02 +03:00
acfaae9d46 MXS-2480 Use in-memory-database in PAM authenticator
This was already fixed in develop, but the fix is both small and useful
so should be backported.
2019-06-13 17:47:08 +03:00