8965 Commits

Author SHA1 Message Date
Johan Wikman
5217836e83 Update 2.4.8 Change Date
Same as that of 2.3.17. Consequently, only the 2.4 specific files
are updated.
2020-03-16 11:25:59 +02:00
Markus Mäkelä
ca69da4991
MXS-2920: Allow max_slave_replication_lag=0
A requirement of no lag should be allowed. The reason why it wasn't was
simply due to the selection of the default value.
2020-03-13 13:23:47 +02:00
Markus Mäkelä
76e855dc1d
MXS-2919: Don't use slaves with unknown lag
If a limit on the replication lag is configured, servers with unmeasured
replication lag should not be used. The code in question did use them even
when a limit was set as the value used for undefined lag was -1 which
always measured lower than the limit.
2020-03-13 13:23:47 +02:00
Markus Mäkelä
2eeb583245
MXS-2921: Fix memory leak in alter maxscale
The alteration of core parameters leaked the JSON object.
2020-03-13 11:44:02 +02:00
Markus Mäkelä
291d2e987f
Improve charset selection
The charset sent in the handshake is now done with the following
priorities:

* First Master server
* Last Slave server
* First Running server or Down server whose charset is known

The change is that server in the Down state to which we've successfully
connected to can also be used as the charset source. This, in addition
with an "empty" default charset, helps avoid the use of the default latin1
charset unless absolutely necessary.
2020-03-12 11:03:04 +02:00
Markus Mäkelä
caf3b4cf75
Remove redundant call
The function was already called by mxs_mysql_real_connect.
2020-03-12 11:03:04 +02:00
Johan Wikman
d0ab797938 Merge branch '2.3' into 2.4 2020-03-12 10:33:57 +02:00
Markus Mäkelä
6f018e752b
Process error events first
This prevents EPOLLOUT/EPOLLIN events from triggering confusing errors if
an EPOLLERR event happens at the same time.
2020-03-10 14:25:57 +02:00
Johan Wikman
e0cd6adb26 Update change date for 2.3.18 2020-03-10 10:45:47 +02:00
Markus Mäkelä
f7d502d1e1
Use json_object_set_new
The non-set case should only be used when a copy of an existing object is
needed. This fixes a memory leak in Cache::do_get_info.
2020-03-09 07:51:08 +02:00
Markus Mäkelä
6f45545e09
Fix call command memory leak
The module command arguments were never freed.
2020-03-09 07:38:53 +02:00
Markus Mäkelä
3da2580f09
Fix list modules memory leak
The wrong JSON function was used: the one without the _new suffix will
copy the memory.
2020-03-09 07:31:49 +02:00
Markus Mäkelä
2bb914b21e
Fix param_type_to_str
Duration wasn't in the switch. Removing the default case allows this to be
detected at compile time.
2020-03-09 07:23:52 +02:00
Markus Mäkelä
eb0432b7b2
MXS-2860: Extract socket error only when needed
As the process of extracting the socket error also resets it, it should be
done only when necessary.
2020-03-06 13:56:42 +02:00
Markus Mäkelä
9eceeffc04
MXS-2811: Set TLS version with MARIADB_OPT_TLS_VERSION
The ssl_version values now also affect the TLS version used by the
connector.
2020-03-05 21:13:38 +02:00
Markus Mäkelä
1bf46fadf6
MXS-2891: Log password hash on mismatch
By logging the password hash when user authentication fails due to a
password mismatch, we can be certain what the client sent and what is the
currently stored value in MaxScale. This should not be on by default which
is why a new parameter is required.
2020-03-04 17:11:34 +02:00
Markus Mäkelä
4a5293ebba
Merge branch '2.3' into 2.4 2020-03-02 18:05:11 +02:00
Markus Mäkelä
67fee60f80
Fix Auth Error server status
The mon_ping_or_connect_to_db resets the MYSQL handle which caused the
loss of the error message. Returning a new enumeration value for
authentication errors solves this problem.
2020-03-02 16:32:35 +02:00
Markus Mäkelä
4e5d9099ed
Merge commit 'e180c200555576cc1f9bfc77342abba422934e4a' into 2.4 2020-03-02 12:51:57 +02:00
Markus Mäkelä
e180c20055
MXS-2899: Update charset only when successful
By updating the server charset only when we successfully query it, the
charset will not change due to network connectivity problems.
2020-02-27 14:18:51 +02:00
Markus Mäkelä
9ca2c7f777
Merge branch '2.3' into 2.4 2020-02-24 14:10:19 +02:00
Markus Mäkelä
b241f7ed2a
MXS-2896: Fix monitor connection creation
The connection is now correctly null after a failed attempt to connect.
2020-02-24 12:02:50 +02:00
Markus Mäkelä
405b10ad50
Fix server TLS regression
The code in 2.3 was changed to allow "empty" SSL definitions now that the
system CA is used. The code in 2.4 did not allow this which caused non-TLS
connections to be created when only ssl=true was defined.
2020-02-17 20:03:35 +02:00
Markus Mäkelä
5842242e94
Fix debug assert on SSL with system CA
The debug assertion was not updated in the merge.
2020-02-17 20:03:35 +02:00
Markus Mäkelä
912cb711e3
MXS-2844: Fix binlogrouter destruction
Binlogrouter services can now be destroyed at runtime.
2020-02-14 08:55:48 +02:00
Johan Wikman
f576680ed9 Update 2.4.7 change date
Only the files that were not already updated as part of the
2.3.17 release.
2020-02-12 15:21:44 +02:00
Markus Mäkelä
fec1698db5
MXS-2889: Fix Replicator hang on shutdown
If a connection to the servers cannot be made, the replicator thread would
never exit.
2020-02-12 13:33:27 +02:00
Markus Mäkelä
3fc20d4345
MXS-2822: Use both last_write and last_read
The code relied on last_read for the idle time calculation which caused
the pings that were written to not reset the idle time. This increased the
chance of multiple COM_PING packets being sent to a backend before a reply
was received.
2020-02-12 13:33:27 +02:00
Johan Wikman
8b763fb88b Merge branch '2.3' into 2.4 2020-02-12 08:27:48 +02:00
Johan Wikman
919686f7ad Merge branch '2.3.17' into 2.3 2020-02-12 08:22:59 +02:00
Markus Mäkelä
d63bd7ca80
Merge branch '2.3' into 2.4 2020-02-11 22:43:49 +02:00
Markus Mäkelä
fd875cbf6d
Remove faulty debug assertion
The use of the server state is not transactional across multiple uses of
the function. This means that any assertions on the target state can fail
if the monitor updates the state between target selection and the
assertion.
2020-02-11 22:34:39 +02:00
Markus Mäkelä
d700fc32ed
Merge branch '2.3' into 2.4 2020-02-10 15:58:01 +02:00
Markus Mäkelä
c18f9c6bd7
MXS-2883: Handle AuthSwitchRequest packets
The backend didn't expect AuthSwitchRequest packets in response to the
handshake response packets. This is allowed by the protocol and appears to
happen with at least MySQL 8.0.
2020-02-10 15:35:47 +02:00
Johan Wikman
cfb3f79b54 Update 2.3.17 Change Date 2020-02-10 15:28:38 +02:00
Esa Korhonen
75ba527b1c Merge branch '2.3' into 2.4 2020-02-10 13:59:30 +02:00
Esa Korhonen
ef769573e4 MXS-2880 Fix typo in json output
"seconds_behing_master" -> "seconds_behind_master"
2020-02-10 12:59:30 +02:00
Markus Mäkelä
cb016fb90a
Merge branch '2.3' into 2.4 2020-02-10 10:47:47 +02:00
Markus Mäkelä
39cf6a8000
MXS-2860: Update last_read only on successful reads
This prevents empty or failed reads from updating the last_read flag which
in turn gives us the correct connection idle time when network errors
occur.
2020-02-10 10:46:32 +02:00
Markus Mäkelä
98e6bdcd90
MXS-2878: Enforce TLS for Connector-C connections
Connector-C connections now require TLS if the servers are configured with
it.
2020-02-10 10:46:32 +02:00
Markus Mäkelä
791d2ade99
Log latest error on broken master connection
When the master goes down, log the latest error if one is present.
2020-02-10 10:46:11 +02:00
Markus Mäkelä
4a725da940
Merge branch '2.3' into 2.4 2020-01-31 12:27:50 +02:00
Markus Mäkelä
f6d848d58c
MXS-2859: Treat newlines in strings as errors
Allowing raw newlines in string values breaks configuration serialization.
2020-01-30 10:44:00 +02:00
Markus Mäkelä
043df59ffa
Merge branch '2.3' into 2.4 2020-01-29 14:38:29 +02:00
Markus Mäkelä
a311613935
MXS-2858: Fix backend side throttling
The code registered both client and backend callbacks for backend
DCBs. This caused the whole connection to hang if backend side throtting
was ever triggered.
2020-01-29 14:35:52 +02:00
Markus Mäkelä
f53faba795
MXS-2857: Disable peer verification by default
The fix to the bug where peer certificates were validated but not required
caused the default behavior to change. The default should've changed at
the same time the fix was made.
2020-01-29 14:35:03 +02:00
Markus Mäkelä
25045c41a2
Merge branch '2.3' into 2.4 2020-01-24 13:06:42 +02:00
Markus Mäkelä
a0affe1bb7
MXS-2784: Use SQL to fetch default character set
The Connector-C was changed to always return only the client's charset,
not the actual charset that the connection ends up using. To cope with
this, the code has to use SQL to join the default character set name to
the default collation for it which can be used to extract the numeric ID
of the charset.
2020-01-24 10:51:15 +02:00
Markus Mäkelä
17916969b6
Merge branch '2.3' into 2.4 2020-01-24 09:48:05 +02:00
Markus Mäkelä
4641dc208f
Fix sescmd debug assert
The assertion will not hold for COM_CHANGE_USER. This prevents the debug
assertion but the actual backend code should also be changed.
2020-01-23 18:38:05 +02:00