The FindLua.cmake requires other modules provided by newer CMake installations
so including just this file is not useful. The correct way to fix this
build failure is to update the CMake to a newer version.
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.
The readwritesplit documentation now explains the multi-statement behavior in
more detail and provides information about situations where the default
multi-statement behavior can be disabled.
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.