68af4cb62e
MXS-2556 Rename configure -> post_configure
...
Rename config::Configuration::configure() to
config::Configuration::post_configure(). Latter name makes it
unambiguously clear at what point the function is called.
2019-06-11 09:46:04 +03:00
a6b456dfbd
MXS-2556 Add support for routers to new config mechanism
2019-06-11 09:46:04 +03:00
77197d2ce1
MXS-2556 Add Server type to new config mechanism
...
- Add test as well
- Sort test so that the types are tested in alphabetical order
2019-06-11 09:46:04 +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
e078f95a42
MXS-1550 Add net_write_timeout paramater for service
...
net_write_timeout is used to timeout writes take too long.
2019-06-10 10:31:35 +03:00
926f0057c2
Move QueryResult-class to a separate file
...
The maxsql/src/mariadb.cc-file contains only general utility functions.
2019-06-07 11:32:46 +03:00
655e5fab5b
Move length-encoded integer/string functions to maxsql
2019-06-07 11:32:46 +03:00
5e03ff35eb
Continue external command cleanup
...
Simplify serverlist creation code.
2019-06-07 11:30:44 +03:00
ceb58d615e
MXS-2540 Add monitor support to new config system
...
The configuration system needs to be aware of standard monitor
parameters.
2019-06-05 11:10:28 +03:00
4ed154d07f
Create ExternalCmd during monitor configuration
...
The command object need not be recreated every time it's ran.
2019-06-04 14:55:09 +03:00
44d1b821c3
Merge branch '2.3' into develop
2019-06-03 13:54:55 +03:00
d5e8315290
Assert that buffers are non-null in mysql.h
...
The functions assume that the buffer is never null and thus should be
asserted.
2019-05-31 14:01:15 +03:00
a4ee390fe5
Never construct mxs::Buffer from nullptr
...
A mxs::Buffer should never be constructed from a null pointer and if done,
it is very likely due to an error.
2019-05-31 14:01:15 +03:00
47ae75c6a5
Make MXS_COM_UNDEFINED a part of the enum
...
This way it is a valid enum value and it prevents UBSAN from complaining
about it.
2019-05-31 14:01:14 +03:00
954c1157dc
MXS-2483: Add note to set_context documentation
...
As the function is required by the binlogrouter, we cannot outright remove
it without refactoring how the servers are handled in it.
2019-05-28 14:34:51 +03:00
38b57497b9
MXS-2486: Move to_string into SSLProvider
...
The functionality is more a part of the provider than the context so it
should be defined in it. It also doesn't use any parts of the SSLContext
which makes it somewhat more clear that it doesn't belong there.
2019-05-28 14:34:50 +03:00
cab35b2dea
MXS-2486: Fix listener serialization
...
The serialization should be done via the parameters. This also makes
SSLContext::serialize redundant.
2019-05-28 14:34:50 +03:00
11a8488162
Begin converting EXTERNCMD to a class
...
Mostly renaming for now.
2019-05-28 11:32:23 +03:00
a82841333d
Merge branch '2.3' into develop
2019-05-28 10:57:18 +03:00
859e930466
MXS-2486: Make SSL configurations immutable
...
Changes to SSL configurations is expected to be rare which allows them to
be made into immutable objects once created. This is an acceptable
compromise between performance and usability.
2019-05-24 15:33:18 +03:00
52ef9afcc6
MXS-2483: Add missing deletion of defaulted functions
2019-05-24 15:33:18 +03:00
c2975d33f8
MXS-2483: Fix dcb.hh includes
...
The header depended on ssl.hh to include the OpenSSL headers even though
it used OpenSSL types. By fixing these dependencies the ssl.h header can
now freely include the rworker_local type which removes the need for the
hidden implementation of SSLProvider.
2019-05-24 15:33:18 +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
cb72b2a5cc
MXS-2483: Move SSL functionality into SSLProvider
...
The class is intended to be inherited by objects that need an SSL context
and a configuration. In practice this will be servers and listeners.
The SSLContext is stored in a rworker_local shared_ptr that makes it
possible to update safely. As the copying is always done behind a lock the
cached local value always holds a valid SSLContext instance for the
duration of all function calls.
Using the pImpl idiom, the routingworker.hh header is not exposed in the
ssl.hh header. This allows the SSLProvider class to be inherited more
easily.
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
4e2d350838
MXS-2483: Return std::unique_ptr from SSLContext::create
...
Smart pointers are far nicer than raw pointers.
2019-05-24 10:05:43 +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
bc500d2565
MXS-2483: Store server SSLContext in unique_ptr
2019-05-24 10:05:42 +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
b6b0a69440
Fix parameter option overlap
...
All duration parameters behaved as if they were deprecated due to the bits
overlapping.
2019-05-22 12:25:06 +03:00
b04415d8da
Fix use of gwbuf_length in mxs::Buffer
...
Backend should use empty() instead of length() to see if the buffer is
empty. The length of a buffer should always be valid to call, even on
empty buffers.
2019-05-21 13:15:20 +03:00
c4fff21909
Fix gwbuf_apped assertion on writeq drain
...
The DCB writeq would be the tail pointer and it would be NULL.
2019-05-21 13:15:20 +03:00
cf46004bd8
Make the servers-array in Monitor private
...
This prevents derived classes from modifying the array directly,
which would be unsafe.
2019-05-21 10:58:24 +03:00
6317a86c69
MXS-2495 No nulls for GWBUF_IS_CONTIGUOUS()
...
The macro GWBUF_IS_CONTIGOUS() and the actual implementation
gwbuf_is_contiguous() can only be called with a non-NULL pointer.
2019-05-21 10:52:34 +03:00
08bb5d009d
MXS-2483: Make some SSLContext methods const
...
The serialization and opening of a new SSL session can be const.
2019-05-20 15:46:53 +03:00
c78e907da0
MXS-2483: Minor SSL usage cleanup
...
Changed getter function return values to std::string, converted
MXS_CONFIG_PARAMETER::set_from_list to take std::strings instead of const
char pointers.
2019-05-20 15:45:19 +03:00
73796be9d6
MXS-2483: Make SSLContext a C++ class
...
The class now encapsulates all the functionality that is related to
setting up a SSL context.
2019-05-20 15:45:18 +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
cab336ed89
MXS-2483: Rename SSL_LISTENER to mxs::SSLContext
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
a6c5e880c1
MXS-2470 Validate GWBUFs
...
A GWBUF given to any gwbuf-function:
- Must not be NULL. Exceptions are gwbuf_free() and gwbuf_append(),
in analogy with free() and realloc() respectively.
- Must be the head of a chain.
- Must be owned by the calling thread.
2019-05-17 14:37:38 +03:00
c801789ff3
Cleanup monitor running state
2019-05-17 13:34:48 +03:00
08b4c26652
Monitor types and fields cleanup
...
Moves some enums to class enums. Moves some free functions to class methods.
2019-05-17 13:34:48 +03:00
f86f2c7688
Move remaining monitor status print functions inside class
2019-05-17 13:31:20 +03:00
884b5ea706
Change monitor ticks to atomic_long
...
The original atomic_int64_t was not supported on older compilers.
2019-05-14 14:02:02 +03:00
a9b1e3a442
Move some Monitor fields to private and protected
...
None of the fields should be publicly writable and some should not even
be writable from derived classes.
2019-05-10 14:48:41 +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