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.
The preparation and closing of prepared statements was sent to all servers
even though the execution was always sent to the master. With this change,
all queries which interact with prepared statements are only sent to the master.
The sending of statement preparations to all servers is a problem when a
statement which depends on a database or a table is created and the DDL
statement which created that table has not yet been replicated to the
slaves.
In addition to fixing the aforementioned problem, this change should also
reduce unnecessary network traffic to slaves and improve the overall
performance of the prepared statements.
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.
Changed burst_size to long instead of unsigned long.
This way check burst_size > 0 is now effective.
Setting "burstsize" option in router_options may be required.
i.e.: burstsize=10M
Changed burst_size to long instead of unsigned long.
This way check burst_size > 0 is now effective.
Setting "burstsize" option in router_options may be required.
i.e.: burstsize=10M
It was possible that a backend server was doing authentication while the client
closed the session. The more connections the router created the more likely it
was. This caused unnecessary reloading of the database users and confusing error
messages.
With the implemented fix, there are additional checks for the session state
before the users are reloaded or error messages are logged.
Since the PCRE2 library was always going to be a part of MaxScale, there was
no real reason to have it as a shared library apart from smaller binaries.
The username matching was working as intended but the session's active value
was ignored when queries were being routed. This meant that both the username
and the IP address of the user were ignored and query replacement was always
done.
The binlog file is now always opened when it is needed and closed
when we are finished with it. That will remove any potential
file concurrency issues between different threads dealing with
the same slave.
The binlog file is now always opened when it is needed and closed
when we are finished with it. That will remove any potential
file concurrency issues between different threads dealing with
the same slave.
Slave request for a log_pos behind binlog file size may result in a
disconnection or replication error:
if binlog file is latest one slave get disconnected otherwise an error
message is returned and replication stops
Slave request for a log_pos behind binlog file size may result in a
disconnection or replication error:
if binlog file is latest one slave get disconnected otherwise an error
message is returned and replication stops
Made some variables stack allocated so there is no change of memory leaking.
There was no real reason to allocate memory from the heap for the variables in
question since they did not need to persist outside the scope of the function.
Some of the data was not reset for the branch session when a query
was not duplicated which could lead to a hang. Also the COM_FIELD_LIST
duplicated to the branch session even though it doesn't change the
session state.
If a statement wasn't cloned for the Tee filter, the session would be closed
leading to a possible hang. Instead of closing the session when a statement
isn't cloned, it should not expect a response from that server for that statement.