The `script_timeout` and `journal_max_age` parameters weren't handled in
the monitor alteration code.
Also added missing documentation to maxadmin help output for
`alter monitor`.
When the database firewall filter is used in white-list mode,
'USE <db>' should be allowed. When connecting, it is always
possible to specify the database anyway so restricting
'USE <db>' serves no purpose.
If a script variable resolves to an empty string, the replacement attempt
will fail with an out-of-memory error. The following realloc call will
fail as it requires a positive value for the new size.
The test now checks that both users with passwords and users without
passwords work through MaxScale when skip_authentication is enabled. In
addition to this, the test also makes sure that the wrong password and a
missing password are properly detected.
The result of the authentication should be ignored but the scramble that
is calculated as a side-effect still needs to be stored. This can be done
by altering the SQL used to get the matching row to only match on the
username, not the network address.
Also expanded the test case to cover the use of bad credentials.
The avrorouter now uses the parameters from the source service. This
removes the need for redundant parameter definition in the avrorouter
service when they are defined in the binlogrouter service as parameters.
Added some missing configuration sanity checks and updated the tutorial to
reflect the new configuration method introduced in 2.1.
The documentation stated that the binlogrouter would use the cache
directory to store the binary log files. In reality, there was no default
value and the service would fail to start without a binlogdir parameter.
The router now uses the data directory (/var/lib/maxscale/) to store the
binary logs.
Set the default value of mariadb10-compatibility to true. This is in line
with the fact that most installations should use the router with a MariaDB
10.0 server or newer.
The binlogrouter tests can safely use the sync_slaves functionality of the
test framework as long as a sensible timeout is used.
Cleaned up the tests by removing redundant code and allocating classes
from the stack thus removing the need to handle memory allocation.
If a prepared statement fails to execute on a backend server, no prepared
statement ID is returned. As the connection to the slave backend will be
closed when the result of a session command differs from the master's
response, there's no need to even attempt extracting the response.
This change avoids the triggering of a false positive in
mxs_mysql_extract_ps_response when an attempt to extract a
COM_STMT_PREPARE response is made on a response that isn't a
COM_STMT_PREPARE response.
When readwritesplit is routing any queued queries, the currently executed
command of the protocol modules needs to be adjusted by
readwritesplit. This is not a true fix but more of a workaround to fix the
problems of queued query execution.
The correct solution would be to move the queued query handling into the
client protocol module so that all components see the same state.
Asserting that only a complete COM_STMT_PREPARE is returned when the
prepared statement preparation is extracted will guarantee that the
protocol works as expected.
The test inserted 200k rows with autocommit enabled which made it very
slow. Wrapping the inserts inside a transaction gives the test a
significant speed boost.
The tests should only test the cases when the payload size changes the
number of packets the query generates. This involves generating only one
packet, one full packet and one partial packet and one full packet and one
empty packet. These cases should cover all reasonable edge cases and
further testing doesn't seem to provide any significant benefit.
If a prepared statement sends large amounts of data, the target server
where the data is sent will be tracked. The tracked target was not reset
after a multi-packet query was completed and the target itself was used to
check whether the session was processing a multi-packet query.
Changed the check to use the boolean variable instead of the target and
added a reset of the tracked target after a multi-packet query was
completed.
The fwf test now only tests the functionality of the rules themselves, not
the parsing. The fwf_syntax test handles the testing of the parser. The
fwf2 test was removed as it was almost identical with the original fwf
test.
Removed unnecessary sleeps from tests that appear to serve no
purpose. Moveed the kerberos code from the general startup routines to the
kerberos test.
Every time MaxScale was restarted, the test waited for a total of 25
seconds. As MaxScale should start before the command returns, the sleep is
not necessary.
Added StartLimitBurst=0 to the systemd service file to allow rapid
restarts of MaxScale.