The service permission checks did not check for SELECT privileges on
mysql.tables_priv which caused confusing error messages. The database
grant erros also did not log the MySQL error message which is often very
helpful when resolving permission errors.
The readwritesplit assumed that the execution of a session command would
always succeed. This is not the case when a write to the backend server
fails and it is not something that shouldn't happen.
The client side authentication assumed that it was processing contiguous memory.
This caused the authentication to fail when packets were received in multiple
parts. Transforming the buffer chain into one contiguous buffer fixes this problem.
The default version string is now `5.5.5-10.0.0 <MaxScale version>-maxscale`.
This fill fix Java connector issues related to version string processing.
It is possible that messages logged immediately before exiting are not flushed
to disk. Flushing all logs before exiting from the main function guarantees
that any relevant log messages are flushed to disk.
Inverting the default action of not routing packets to always routing packets
makes the code simpler to understand. Removing some of the not so useful debug
logging also makes the code more readable and easier to understand.
The server weights were ignored for the first connection and servers with a
weight of 0 would get connections if the connection count was high enough.
This fixes the weighting behavior so that when connections are created,
servers with a weight of 0 will be ignored as long as there is a server
with a positive weight available.
With this change, three servers configured with weights 2, 1 and 0 would
get connections balanced in the following way:
weight = 2, 66% of connections
weight = 1, 33% of connections
weight = 0, 0% of connections
If the server with the weight of 2 would go down, the server with the weight
of 1 would get 100% of the connections. If both servers with positive weights
go down, the server with the weight of 0 would be used.
Some platforms did not have the FindLua.cmake file which caused errors on
configuration. Moved the invocation of find_package to the filter CMakeLists.txt
so that it is only called if the luafilter is built.
The starting of a service without listeners would fail but there wouldn't be
any log messages about the reason of the failure. In addition to this, MaxScale
would try to restart the service periodically which would lead to unnecessary
error messages.
With this change, missing listeners for services are considered configuration
errors.
Renamed is_mysql_comment_start to is_mysql_statement_end because it checks
whether a statement truly ends instead of just checking comment block starts.
The calculations for buffer length in readwritesplit now use the payload size
instead of the buffer size.
The C style comments were not ignored and the -- style comments
did not check for the trailing whitespace and made return values char*.
The creation of a stored procedure would prevent sessions from using
any of the slave servers because readwritesplit would interpret
the creation statement as a multi-statement query.
Parts of modutil and readwritesplit now compare pointers to pointers instead of
converting pointers to integers.
The monitor permission checks didn't use the standard connection timeouts but
used hard-coded values. The config.c tried to connect to the embedded library
but since it is not used by it anymore, it always fails.
Added more documentation to functions about how, when and with what parameters
the Lua functions are called with. Also adjusted the module version to experimental.