Empty databases were not mapped to ServerMap because they had no tables
to map. Modified the query to also include empty databases making it
possible to also connect to empty databases through schemarouter.
Removed the excessive comments in favor of a simplified description. Use
stack-allocated TestConnections and simplify assertions.
The main change is the different SQL used to update the user with the old
password. Direct modification of the `mysql`.`user` database isn't very
neat but it guarantees that the value is updated.
The test should stop MaxScale at the start unless the manual debug flag is
given on the command line. This fixes the connection failure of mxs1719
but reveals a problem with the filter itself.
Due to the skewed accept distribution without SO_REUSEPORT, we use
round-robin assignment of workers for new client connections. This
provides better performance as work is more likely to be evenly
distributed across all threads.
Using a least-busy-worker algorithm would provide a more stable result but
this is not trivially simple to implement. For this reason, the
round-robin based approach was chosen for 2.2.
Parameters that accept whitespace-only values need to have their default
values quoted if they contain only whitespace characters. In 2.2 the
qlafilter is the only module that did not do this.
When a test is checking the status of the nodes, the output is relatively
verbose.
Also changed dropping of users to use the IF EXISTS syntax. This will
remove the errors if the users do not exist.
When a valid target was not found, no error message was logged by the
router. This would cause the "Routing the query failed. Session will be
closed." message to be logged with no explanation as to why the routing
failed.
In addition to the above-mentioned case, no message would be logged if the
target for a COM_STMT_FETCH was not in use.
If the authentication failure was due to a missing database, this extra
information can be logged. This will help cases where users are using
databases that do not exist.
If only one server is used, the amount of requests can be reduced from a
minimum of two to a minimum of one. In most cases this cuts down the
response time in half.
If two or more session commands contain identical buffers, the buffer of
the first session command is shared between the others. This reduces the
amount of memory used to store repeated executions of session commands.
The purging of session command history in readwritesplit was replaced with
session command de-duplication. This was done to prevent problems that
could arise when the order of session commands plays a significant role.
The assertion that was added to RWSplitSession::handle_slave_is_target
failed when delayed_retry was enabled or when slave reconnection
occurred. In 2.3, targets returned by the target selection functions do
not need to be in use but they must be valid connection targets.
All executed session commands were logged in the RWSplitSession
destructor. This is not really necessary and shouldn't have been placed
there in the first place.
When the `optimistic_trx` mode is enabled, all transactions are started on
a slave server. If the client executes a query inside the transaction that
is not of a read-only nature, the transaction is rolled back and replayed
on the master.
The optimistic_trx parameter will control whether transactions are assumed
to be read-only and will be optimistically executed on slave
servers. Currently, the parameter does nothing.