Commit Graph

8536 Commits

Author SHA1 Message Date
3e85500491 Merge branch '2.3' into 2.4 2019-07-02 08:38:15 +03:00
418a1f5210 MXS-2584: Assert that workers are initialized
The initialization must always be done before a call to RoutingWorker::get
is done.
2019-07-01 16:37:55 +03:00
b2019ea18e Correctly reset PS continuation state
The state was modified only by PS commands.
2019-07-01 10:33:18 +03:00
4954c7f6b7 Fix sending of unknown PS error
The error was only generated for COM_STMT_EXECUTE commands when all PS
commands should trigger it. In addition, large packets would get sent two
errors upon the arrival of the trailing end.
2019-07-01 10:25:41 +03:00
40f35618ad MXS-2562: Fix out-of-order error during COM_CHANGE_USER
If an error is generated while a COM_CHANGE_USER is being done, it would
always use the sequence number 1. To properly handle this case and send
the correct sequence number, the COM_CHANGE_USER progress needs to be
tracked at the session level.

The information needs to be shared between the backend and client
protocols as the final OK to the COM_CHANGE_USER, with the sequence number
3, is the one that the backend server returns. Only after this response
has been received and routed to the client can the COM_CHANGE_USER
processing stop.
2019-06-28 20:25:31 +03:00
3b6387c952 MXS-2562: Stop immediately on mid-resultset failure
If a server fails mid-resultset, there's not a lot we can do to recover
the situation. A few cases could be handled (e.g. generate an ERR if the
resultset has proceeded to the row processing stage) but these fall
outside the scope of the original issue.
2019-06-28 20:25:31 +03:00
74d15cee09 MXS-2562: Always send errors with sequence number 1
As is explained in MDEV-19893:

   Client reads from socket, gets the packet from 1. with seqno=0, which
   it does not expect, since seqno is supposed to be incremented. Client
   complains, throws tantrums and exceptions.

To cater for clients that do not expect out-of-bound messages
(i.e. server-initiated packets with seqno 0), all messages generated by
MaxScale should use at least sequence number 1.
2019-06-28 20:25:31 +03:00
5dca53f877 Merge branch '2.4.0' into 2.4 2019-06-28 17:58:01 +03:00
5ab5e914e7 MXS-2582: Deep-copy PS buffers in RWBackend::write
Deep-copying prevents subsequent modifications done by the caller from
affecting the data that can be potentially stored in the write queue of
the backend's DCB.
2019-06-28 09:46:15 +03:00
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
3b39d42d3b Merge branch '2.3' into 2.4 2019-06-27 18:56:25 +03:00
166d26ff13 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.

Commit cherry-picked to 2.4.0 from 2.3.
2019-06-27 15:18:49 +03:00
d8790fa3e7 Merge branch '2.2' into 2.3 2019-06-27 14:20:42 +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
1d87b88c50 Avoid using sqlite3_errstr()
The function is not in old SQLite3-versions such as the one used by
Centos6.
2019-06-27 10:55:24 +03:00
fcc19f3c66 Merge branch '2.3' into 2.4 2019-06-27 08:53:33 +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
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
d45915c279 Treat empty avro filenames as an error
If an empty filename is requested, treat it as an error.
2019-06-26 10:17:21 +03:00
01822490ca Fix avrorouter and cluster usage
The servers defined by `cluster` wouldn't get used.
2019-06-26 10:17:21 +03:00
59e7b2b09d Deprecate mqfilter 2019-06-26 10:08:15 +03:00
c8145f94c9 Merge branch '2.4.0' into 2.4 2019-06-26 09:51:23 +03:00
d41d4021a8 Merge branch '2.3' into 2.4.0 2019-06-26 09:20:35 +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
ae18e454cc Remove manual revision history from tests 2019-06-25 20:44:15 +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
28a2a726f8 Merge branch '2.4.0' into 2.4 2019-06-25 11:48:44 +03:00
f961bf1d96 Merge branch '2.3' into 2.4.0 2019-06-25 11:46:44 +03:00
7d10a71015 Fix broken Change Dates
Were not correct, so were not updated with all others.
2019-06-25 10:11:55 +03:00
0ba779d5a2 Update 2.4.0 Change Date 2019-06-25 10:11:55 +03:00
b8bb8702bd Fix broken Change Dates
Were not correct, so were not updated with all others.
2019-06-25 09:52:42 +03:00
2ab9aa9a94 Update 2.4.0 Change Date 2019-06-25 09:19:55 +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
aac0ecc373 MXS-2574: Add PATCH for /users/inet endpoint
The alteration of user passwords is now done inside MaxScale. This
prevents the possibility of a user locking themselves out.
2019-06-25 08:23:17 +03:00
77671a2393 Also preload mariadbbackendauth
The backend protocols require it.
2019-06-24 22:46:27 +03:00
c1c376b7ac MXS-2575: Fix REST-API error propagation
The errors are now correctly sent even with requests that upload data.
2019-06-24 15:15:47 +03:00
2f56264715 Preload mariadbbackend for unit tests
This should fix the failure of test_config2 and make server allocation
work.
2019-06-24 15:15:47 +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
24b575bb93 Print error if child process cannot access monitor script file 2019-06-24 12:22:25 +03:00
1cb13582ff Fix worker state debug assertion
Stopped workers will receive messages.
2019-06-24 11:03:50 +03:00
9f771ffc2b Revert "MXS-2513 Deprecate firewall and masking filters"
This reverts commit de3c5721e95d5d5be909a56faeb121ad09a2f6fe.
2019-06-24 10:21:01 +03:00
278c26cd54 Fix build failure
mxs::rtrim was renamed to mxb::rtrim.
2019-06-20 23:17:41 +03:00
0b67ce1e82 Merge branch '2.3' into develop 2019-06-20 14:36:48 +03:00