Commit Graph

8938 Commits

Author SHA1 Message Date
3620db9b0a Ignore the default value of connector_plugindir
The default value isn't a valid path and should be changed later on.
2021-02-11 16:43:00 +02:00
e48c5d11fc MXS-3345: Create persistdir earlier
The directory was created when the configuration was being processed and
it wasn't checked unless it was configured to a non-default value. With
the addition of the path validation, the directory must be created
earlier.
2021-02-10 15:05:40 +02:00
2657cc100e MXS-3330: Book only expected responses
Responses generated by replayed session commands must not be treated as
actual responses to retained statements. In 2.5 this is not a problem as
it is done implicitly with the pre-assignment of the server that delivers
the session command response.
2021-02-10 09:42:12 +02:00
47bcb6ad02 MXS-3345: Defer path permission checks
Doing the directory permission checks after all the values have been set
helps avoid problems with intermediate values that aren't valid. This
happens when --basedir generates invalid derived paths and the correct path
is provided as an argument right after it.

The path parameter is read from the configuration file only if it hasn't
been modified by a command line option. The case where an invalid command
line option is given but a valid configuration parameter would override it
is still treated as an error.

Also added a clarifying comment into set_dirs to make sure the handling
for the two path parameters is not moved inside set_runtime_dirs.

Fixed the testing scripts for the REST API and MaxCtrl now that the
directory permission checks are done correctly. Previously some paths seem
to have been ignored.
2021-02-09 17:36:41 +02:00
fac3ff4366 MXS-3346: Fix tarball plugin directory
The plugin directory wasn't installed and using --basedir with a path to
the extracted tarball wouldn't be enough.
2021-01-19 14:32:12 +02:00
dd340f9ec8 MXS-3346: Fix --basedir write permission checks
The connector plugindir required write access when it doesn't need it.
2021-01-19 14:32:11 +02:00
c5bcf7a8b1 2.4.15 Update change date 2021-01-18 15:30:30 +02:00
26d2c2387f Fix monitor connection error messages
The connection is closed by the ping_or_connect_to_db function which
causes the information about why the connection failed to be lost.
2021-01-18 12:02:40 +02:00
7e6eb55618 MXS-3324 Enable autocommit when using Connector-C
May solve some monitor issues on servers with default autocommit
set to off.
2020-12-17 13:37:30 +02:00
0c904eae5e MXS-3158 Preserve character set and collation when altering events
During switchover/failover, server events are altered. The ALTER
EVENT command automatically modifies the event charset and collation
to the values of the connetion running the query. This may cause
the event to become invalid.

Fixed this by changing connection charset and collation to the ones
in the event description just before altering it.
2020-12-14 14:06:43 +02:00
ce85a7292f Merge branch '2.3' into 2.4 2020-12-14 12:08:52 +02:00
d869dd358e MXS-3337: Select lowercase variable names
The current code assumes that the variable names are in lowercase. This
fixes the galera monitoring that was broken by commit
43068d20b43a34d5f3b4b4db0fcce701b3cd7cad. In addition, lowercase names
also helps when comparisons are done with std::string.
2020-12-11 18:37:05 +02:00
27a43fdf9d Merge branch '2.3' into 2.4 2020-12-11 16:38:43 +02:00
43068d20b4 MXS-3337: Fix galeramon query
The query now properly queries over both the status and the variables.
2020-12-10 11:56:07 +02:00
1d600a4f10 Merge branch '2.3' into 2.4 2020-12-01 10:11:56 +02:00
74a2ae727e Fix REST API startup error
The error generated by the library seems to use the port argument even if
a sockaddr argument is given.
2020-12-01 09:58:58 +02:00
6c160a3529 Log query classification info for session_trace
This fixes the bug where the detailed query classification info was only
logged when LOG_INFO was globally enabled.
2020-11-23 13:13:19 +02:00
5906f59344 Merge branch '2.4' into 2.4.14 2020-11-19 13:54:55 +02:00
56575882d7 MXS-3301 Rename clustrix -> xpand everywhere 2020-11-19 13:44:06 +02:00
47e1c04d09 MXS-3301 Look for "xpand" to find out whether server is Xpand
We will continue to look for "clustrix" as well so that MaxScale
will continue to work with older releases.
2020-11-19 13:43:30 +02:00
5fc73646a4 MXS-3301 Rename clustrix -> xpand everywhere 2020-11-18 10:02:02 +02:00
9ed51b69e1 MXS-3301 Look for "xpand" to find out whether server is Xpand
We will continue to look for "clustrix" as well so that MaxScale
will continue to work with older releases.
2020-11-17 17:30:50 +02:00
64ca695c84 Revert "MXS-3301 Look for "xpand" to find out whether server is Xpand"
This reverts commit 4728730510409fc15d2b3a55fa6e00008651794d.

The clustrix -> xpand name change causes too much trouble when merging
to 2.5.
2020-11-17 17:21:14 +02:00
4728730510 MXS-3301 Look for "xpand" to find out whether server is Xpand
We will continue to look for "clustrix" as well so that MaxScale
will continue to work with older releases. Clustrix was replaced with
xpand in all symbols.
2020-11-17 13:25:13 +02:00
10582a02fe Merge branch '2.3' into 2.4 2020-11-17 10:54:58 +02:00
f577d09829 MXS-3297: Don't advertise unsupported capabilities
Only bulk execute is supported. Supporting progress reporting currently
breaks the protocol result processing code.
2020-11-17 10:45:03 +02:00
df36ef86d0 2.4.14 Update Change Date 2020-11-16 14:23:26 +02:00
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