The THREAD type was not used everywhere and pthread_t was used instead.
The thread creation function also returned the address of a stack allocated
value which isn't guaranteed to be usable.
This is the first change in an attempt to arrange the linking so that
more errors are detected at link-time.
- All files in server/core but for gateway.c are linked to one shared
library called maxscale-common.
- The files log_manager/log_manager.cc and utils/skygw_utils.cc are
built into maxscale-common as well.
- MaxScale itself consists now only of gateway.c and is linked with
maxscale-common.
- All plugins link with maxscale-common.
- All executables link in addition with {EMBEDDED_LIB}.
After this change, the change (MXS-517) where query_classifier is the
only component that uses ${EMBEDDED_LIB} and the rest mysqlclient can
be made much cleaner.
After a few additional steps, all shared libraries can be linked with
the linker flags "-Wl,-z,defs", which directs the linker to resolve
all symbols. That will require that all shared libraries list all the
libraries they need, but will at the same time ensure that any
missing symbols are detected at link-time and not at run-time.
When MaxScale perceives a state change in one of the servers it will log
an message into the log file stating the previous and the current state.
This will make it easier to analyze failures in the cluster.
The master and slave bits were previously set in more then one place.
This spread out the handling of those status bits and now all replication
related bits are set in one place.
If galeramon isn't able to connect to a Galera node, the server state is left
unaltered. This will cause servers that lose connectivity to be in RUNNING|JOINED
state which causes them to be assigned with the SLAVE status. For servers that are
never accessible, the state will be RUNNING.
The soname version numbers were missing from all the library targets
properties which caused ldconfig to warn about non-symlink libraries
being installed.
A buffer was allocated for strlen(event) characters leading to the
name always being truncated by one character. The use of a buffer was
unnecessary and was fixed by using the mon_get_event_name function directly.
The bundled PCRE2 library will be built as a separate target and configuring
CMake no longer builds it. Instead, it will only be built when it is out of date.
This requires all targets to declare that they depend on the pcre2 target in
order for it to be built.
The change to the mysql.user table in MySQL 5.7 caused MaxScale to stop
working with it. This commit adds functionality that checks which version of
the user data query should be made. It also moves common code related to
server version strings to server.c
The log manager variables lm_enabled_log_files_bitmask, log_ses_count
and tls_log_info that earlier were declared separately in every
c-file are now declared in the log_manager.h header.