Commit Graph

8911 Commits

Author SHA1 Message Date
5a33d45d4d Merge branch '2.3' into 2.4 2020-11-16 09:25:43 +02:00
c49f17f428 MXS-3295: Fix layout of the classify endpoint
The values were stored in the parameters object which is used for
configuration parameters in other endpoints. The proper place for them is
inside the attributes object.
2020-11-16 09:20:50 +02:00
968d43799f MXS-3273: Ignore unexpected responses
Unlike readwritesplit, schemarouter will process all responses from
backends as if they are expected. There are cases where errors are
generated that aren't sent as a response to a query. These queries must be
ignored and not routed to the client. Copying the code as-is from
readwritesplit isn't the cleanest solution but it avoids refactoring code
in a patch release.

The custom error number (2003) used by the backend protocol code was not
an actual error number that the server would send. The error code in
question was for an error that only the C connector returns:
CR_CONN_HOST_ERROR. Using ER_CONNECTION_KILLED as the error number better
conveys the fact that the connection was killed due to a reason not
related to any ongoing query.

By using a known error number that is correctly handled, we also avoid
writing errors to the client in the middle of a resultset or as the
initial response to a result. This explains why the problem described in
MXS-3267 happened in the first place: an unrelated connection was lost in
the middle of a resultset and the error was interpreted as the end of a
resultset. As a result of there being more data to be read, the unexpected
result state messages were logged.
2020-11-04 16:44:46 +02:00
87f97a16c3 Log server name in error message
This makes it clear which server failed.
2020-10-29 15:33:48 +02:00
836334a7a8 Merge branch '2.3' into 2.4 2020-10-23 12:42:46 +03:00
aa5a63be14 Fix debug argument concatenation
The buffer was shorter than the arguments given to it which caused a heap
buffer overflow.
2020-10-23 10:53:26 +03:00
dad5e09e5e Merge branch '2.3' into 2.4 2020-10-19 15:08:22 +03:00
3c2299d1b5 MXS-3239 Add mapping clustrixmon -> xpandmon
So that existing configurations continue to work.
2020-10-19 13:59:46 +03:00
9bc7887728 MXS-3239 Rename [c|C]clustrix names to [x|X]pand names 2020-10-19 13:56:36 +03:00
192ad2289f MXS-3239 Rename clustrix* to xpand*
Typenames still Clustrix.
2020-10-19 13:40:54 +03:00
48ef9754df MXS-3241: Check buffer length
The `is_set` call assumes that at least three characters are present.
2020-10-16 12:22:06 +03:00
faaf7f483e 2.4.13 Update Change Date 2020-10-14 09:15:46 +03:00
933ce0c86a MXS-3220: Fix crash on failed master history replay
This could happen if a session command triggers a master reconnection and
the connection fails while the history replay is ongoing. The code assumed
that history replay would only happen when a query was in the query queue.
2020-10-13 14:31:49 +03:00
ab4ac8e588 MXS-3200 Log mapping error as it will lead to session close 2020-10-12 08:31:36 +03:00
147ed8ef22 MXS-3200 Ensure that passed in p to buffer remains valid
The pointer to pointer to GWBUF must in all cases be updated.
Otherwise it will lead to
1) access to free data, and
2) a double delete.
2020-10-12 08:31:36 +03:00
c25099da01 Improve SSL error message
Log the type of the DCB to help figure out where the error came from.
2020-09-22 16:42:16 +03:00
0be629e5c5 Merge branch '2.3' into 2.4 2020-09-15 18:02:24 +03:00
6129f588a1 Don't parse COM_STMT_EXECUTE packets
The function information is only available for COM_QUERY packets.
2020-09-15 17:55:56 +03:00
9304230212 MXS-3149 Properly remove master-status from server during demotion
Removing it from the pending status field has not effect as the
pending changes have all ready been written to real status.
2020-09-02 15:13:23 +03:00
caedf79464 Merge branch '2.3' into 2.4 2020-08-28 14:24:16 +03:00
63a050bd7a MXS-3051: Show connection TLS cipher
This tells the user whether a session is using TLS or not. Currently, only
the client TLS cipher is shown in MaxCtrl as the backend ciphers require
additional formatting.
2020-08-28 12:16:17 +03:00
ebdb9655e6 MXS-3143: Route FOUND_ROWS to last used target
This will cause the query to be routed to the same server where a possible
SQL_CALC_FOUND_ROWS was executed.
2020-08-28 11:49:07 +03:00
bce427f4ad Merge branch '2.3' into 2.4 2020-08-27 15:21:36 +03:00
dbe94e2dbe MXS-3132: Fix monitor timeouts default values
The values are now what the documentation states they are.
2020-08-27 14:47:27 +03:00
babcda3eca 2.4.12 Update Change Date 2020-08-24 09:42:48 +03:00
df87df3a0d Reduce slow DCB shutdown timeout to 2 seconds
This helps reduce the effect that a hanging connection has on the whole
system.

Making this configurable shouldn't be needed as long as the rate of
authentication failures doesn't exceed an acceptable level. In most
practical cases allowing two seconds for authentication to complete should
be enough.
2020-08-21 14:38:37 +03:00
c5b47389df MXS-3106: Always write the final COM_QUIT
This seems to help with a regression that was introduced in 2.4.11.
2020-08-21 14:38:37 +03:00
b90d42b999 Merge branch '2.3' into 2.4 2020-08-21 10:27:43 +03:00
e105f06ea3 Log latest session command on unexpected result 2020-08-21 09:50:29 +03:00
759c63c8bb Merge branch '2.3' into 2.4 2020-08-20 17:44:09 +03:00
87540f0ea0 MXS-3101 Improve proxy protocol header generation
Client connection file descriptor no longer read. The header now
contains the server's address instead of MaxScale's address.
2020-08-20 15:03:19 +03:00
c0cd751215 Merge branch '2.3' into 2.4 2020-08-20 14:29:16 +03:00
606ae6d2b0 MXS-3121 Log stmt being classified in fatal signal handler
This will make it easier to fix classifier related crashes.
2020-08-20 13:32:24 +03:00
c5870cbaba MXS-3121 Expose statement currently being classified
Intended to be used from fatal signal handlers. As the statement will
be returned only while classification is in process, if a statement
is returned, it is an indication that the crash was caused by the
classification.
2020-08-20 13:27:55 +03:00
f3d4c27e58 Merge branch '2.3' into 2.4 2020-08-19 12:20:49 +03:00
7b7cded1cc MXS-3115: Don't process files in hidden directories
Hidden directories should be treated the same was as hidden files.
2020-08-19 12:15:25 +03:00
49ea5da9e2 MXS-3100 Fix memory leak in top-filter 2020-08-10 15:36:19 +03:00
63e4a63b62 MXS-3101 Log actual error for getpeername/getsockname 2020-08-07 12:47:15 +03:00
ce05b68030 Merge branch '2.3' into 2.4 2020-07-27 14:55:58 +03:00
ffb237628c fix GCC 10 warnings 2020-07-27 10:42:38 +03:00
5c76d3d906 Merge branch '2.3' into 2.4 2020-07-24 08:01:53 +03:00
aaec73a8c8 MXS-3089: Close backend on failed session command
This correctly triggers the session command response processing to accept
results from other servers than the current master backend if the session
can continue. If the session cannot continue, it will be stopped
immediately.
2020-07-23 09:26:53 +03:00
cf1d1178d7 MXS-3087: Fix diagnostic memory leaks
Fixed leak in load_utils.cc and the cache filter. Also changed all
instances of json_object_set with json_object_set_new to make sure it's
only used when the references are to be stolen.
2020-07-22 13:27:36 +03:00
f2a837e2f1 Fix memory leak in throttlefilter
The filter would leak the buffer when it disconnects a client. This fixes
the throttlefilter test if it's run with ASAN or valgrind.
2020-07-15 15:35:12 +03:00
ea35b62373 MXS-619: Delay destruction of the client DCB
By delaying the processing of a client DCB in the zombie queue, we avoid
initiating the shutdown process of the backend DCBs too early. This solves
the problem of the previous implementation where the session shutdown
proceeded too far before the delaying process started.
2020-07-14 10:47:38 +03:00
6abdb60b58 MXS-619: Temporarily disable the fix
The fix isn't fully functional as closed DCBs never process the events
they receive. The mechanism would work if certain events would be
processed but they'll have to be fixed in a later release.
2020-07-13 15:02:47 +03:00
fc9c9fcd77 2.4.11 Update change date 2020-07-07 10:01:38 +03:00
32fa7b6800 MXS-3069: Fix plugin name comparison
Connectors that wouldn't send the plugin name even when the plugin
authentication capability was enabled would have to do an extra step in
the authentication.
2020-07-07 09:23:23 +03:00
6c9249131f MXS-3064: Use latin1 charset
This prevents the server from selecting the charset under which the
queries are processed which can result in conflicts if the tables used are
not compatible with the charset of the string literals used in the query.
2020-07-07 09:23:22 +03:00
4fe71b41ed MXS-3038: Don't connect to lagging slaves
There's no use connecting to a lagging slave if a replication lag limit
has been set.
2020-07-07 09:23:22 +03:00