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
fcc19f3c66
Merge branch '2.3' into 2.4
2019-06-27 08:53:33 +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
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
f961bf1d96
Merge branch '2.3' into 2.4.0
2019-06-25 11:46:44 +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
f5615cc174
MXS-2555 Add support for unix sockets to LocalClient
2019-06-19 15:31:34 +03:00
2343326ecc
MXS-2555 Add execute_kill version, that kills all but a given mysql_thread_id
...
NOTE: This does not work whit unix scokets. The reason is that LocalClient
assumes network sockets. TODO: to add unix socket support.
2019-06-19 15:31:34 +03:00
56e5c417c1
MXS-2555 uncrustify mysql_common.cc, and a minor bug fix in smartrouter.cc
2019-06-19 15:31:34 +03:00
7dde0edb54
Clean up unexpected error handling in readwritesplit
...
By using the Error class, the code can be cleaned up and simplified.
2019-06-14 15:18:01 +03:00
c819271cab
Merge branch '2.3' into develop
2019-06-14 09:40:19 +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
8311dba654
Send the OK outside the KILL functions
...
By sending the OK for the KILL commands outside the function, they can be
used to kill connections that do not expect responses.
2019-06-13 16:44:26 +03:00
1f46f1bfca
Merge branch '2.3' into develop
2019-06-12 12:24:07 +03:00
bb92d61a1b
Fix KILL command packet boundary detection
...
If a packet with a KILL query was followed with another packet in the same
network buffer, the code wouldn't work as it expected to receive only one
packet at a time.
2019-06-12 12:20:26 +03:00
a2b046a482
MXS-2512 Use typenames consistently
2019-06-11 09:44:27 +03:00
b09a4e676d
MXS-2512 Do not recalculate information that exists
...
As the end of the error packet is known, it is better to pass
around an iterator to that instead of recalculating it.
2019-06-11 09:44:27 +03:00
b222a17ed9
MXS-2512 Update error information in additional place
...
An error may be returned directly or as part of a result set.
Both cases must be handled.
2019-06-11 09:44:27 +03:00
aa9b6cb8c5
MXS-2512 Store received error during backend processing
...
If a server returns an error, it will be retained inside RWBackend
so that it later is accessible without having to parse the GWBUF
again.
2019-06-11 09:44:27 +03:00
4efa9dbeea
Remove maxscale/alloc.h
...
The remaining contents were moved to maxbase/alloc.h.
2019-06-10 14:11:25 +03:00
655e5fab5b
Move length-encoded integer/string functions to maxsql
2019-06-07 11:32:46 +03:00
44d1b821c3
Merge branch '2.3' into develop
2019-06-03 13:54:55 +03:00
c219187a1e
Merge branch '2.2' into 2.3
2019-06-03 13:27:57 +03:00
d68f66fede
MXS-2538: Send master charset in the handshake packet
...
By iterating over the servers and sending the master's charset we are
guaranteed a "known good" charset. This also solves the problem where a
deactivated server reference would be used as the charset and server
version source.
2019-05-31 23:01:18 +03:00
e9c652555d
MXS-2538: Fix hang on unknown KILL
...
Unknown KILL commands are now forwarded as-is to the routers.
2019-05-31 14:01:16 +03:00
3af66f3309
MXS-2483: Take SSLProvider into use
...
Servers and listeners now have a SSLProvider member variable that is used
for all SSL related tasks.
2019-05-24 15:33:17 +03:00
8a4b58d52c
MXS-2483: Move SSL configuration into SSLConfig
...
This way the configuration information can be accessed without the
SSLContext.
2019-05-24 15:33:17 +03:00
5b55864b06
MXS-2483: Store listener SSLContext in unique_ptr
...
Also removed some unnecessary checks for session->listener: The Session
constructor takes the listener as an argument.
2019-05-24 10:05:43 +03:00
3b8e28392e
MXS-2483: Make server SSL private
...
The old server_ssl member is now renamed and private. The ssl_context and
set_ssl_context methods provide access to it.
2019-05-24 10:05:42 +03:00
7eff7f8e9e
Remove unused function in mysql_common.cc
2019-05-24 10:05:15 +03:00
397fc97d07
Only count actual failures as auth failures
...
If the authentication process fails due to an inability to start a
session, it should not be counted towards the number of failed
authentication attempts.
2019-05-24 10:05:15 +03:00
0c19d1ea03
Fix debug assertion in mysql_backend
...
The backend read function used a NULL GWBUF with gwbuf_length.
2019-05-21 13:15:20 +03:00
76399200f4
Fix assertion on client SSL read
...
When SSL is enabled, the protocol seems to get zero byte reads which
result in a null GWBUF being passed to gwbuf_length.
2019-05-20 15:46:52 +03:00
1197bd40db
MXS-2483: Move unwanted SSL code to mysql_client.cc
...
The code was only used by mysql_client.cc and should therefore be located
in it.
2019-05-20 15:45:18 +03:00
0f714e9ad4
MXS-2495 Cleanup GWBUF interface
...
All GWBUF macros that address a single link in a chain are now
simple wrappers for equivalent gwbuf_link-functions.
Next step is to drop the macros and replace their use with calls
to the functions.
2019-05-20 09:57:37 +03:00
4ed8726ccf
Fix merge bug
2019-05-14 14:01:16 +03:00
c09617cd82
Merge branch '2.3' into develop
2019-05-14 12:33:50 +03:00
22a9e20f1f
MXS-1957 Change the default authenticators to MariaDB aliases
...
Using MySQLAuth or MySQLBackendAuth causes warning to be logged.
2019-05-13 15:35:09 +03:00
50fef6f361
MXS-1957 Add MariaDBAuth alias
2019-05-13 15:35:09 +03:00
a3bb61486d
Move server_set_status and server_clear_status to monitor
...
The operation goes through monitor code so should be in the according file.
2019-05-10 14:37:35 +03:00
b10fc196a1
Fix maxinfo/maxadmin debug assertion
...
Both services could write to a DCB from a worker that doesn't own it.
2019-05-10 11:23:10 +03:00
6625c1296b
Format authenticator and protocol modules
2019-05-10 10:31:12 +03:00
31ce757f8d
Don't attempt TLS with maxscaled protocol
...
The authenticator doesn't support it so it is pointess to try it.
2019-05-10 09:21:52 +03:00
0e0342e657
Merge branch '2.3' into develop
2019-05-08 10:38:39 +03:00
a652b6bd5b
Add advance(int) to mxs::Buffer iterators
...
This makes iterating over packets in buffers faster while still
maintaining the requirements for forward iterators. Not using operator+=
makes it clear that this is not a random access iterator.
2019-05-08 10:33:27 +03:00
6caa8e55b0
MXS-2414: Send error when host is blocked
...
If a connection attempt is not accepted due to the host being blocked, the
protocol can now return an error message that is sent to the client. Only
mariadb_client implements this as it is the only one who calls the auth
failure methods in the first place.
2019-04-30 14:49:35 +03:00