Cherry-picking the commit from develop since it's also needed for 2.2.
FindASAN did not look for so version 5 and TSAN referred to ASAN. Disable
leak checks for unit tests as some objects always leak, namely servers.
SELECT...FOR UPDATE locks the rows for update, but only if
autocommit==0 or a transaction is active, so in principle even if
it were classified as READ it'd still be sent to master when it
actually matters.
However, even if autocommit==1 and/or no transaction is active, a
slave in read only mode will reject the statement if the user is
subject to the read only restriction (a user with super privileges
is not), which might be considered a server bug. By classifying the
statement as a write, it'll be sent to master and always succeed.
By default ASAN only reports the errors and doesn't cause the program to
crash. By forcing a SIGABRT, the process will generate a core dump which
causes the test to fail.
Although the act of placing environment variables inside the systemd
service file might seem intrusive, they have no effect on non-ASAN
builds. This appears to be the most convenient and straightforward way of
changing ASAN behavior for testing.
The debug assertion is wrong as the code was changed to prioritize hints
over the router target selection. Also removed the superficial check for
master, slave and relay master states as they are implied by the fact that
the connection is in use.
The collection of resultsets needs to be disabled by default when a
response is received to cover the cases where an error is returned.
The collection of results should also not be set for queries that do not
generate any responses.
When the 10.2 users query is executed with a MariaDB server older than
10.2.11, the query will fail due to inadequate grants on the 'users' table
generated as a part of the CTE. To work around the issue, a SELECT grant
on the whole mysql database is required. Logging the server where the
query fails also helps resolve the problem by pointing out where the grant
needs to be added.
Removed unnecessary sections and updated some of the text to be more
specific. Expanded the explanations on where the replication starts and
how the avrorouter needs to be configured. Added example output from the
cdc.py client and removed the relatively useless maxavrocheck section.
The test fails since slaves are constantly going out-of-sync and cannot rejoin
the cluster. After three failovers, the cluster has three standalone server and
the monitor gets confused which server is the master. For now, limit the test to
two failovers.
The test expects the monitor to respond within 5 seconds. This is not
guaranteed to happen so waiting for a monitor interval instead of a
hard-coded duration provides for a more stable test.
Instead of using the correct version in in-source builds, a dummy file is
copied in place. This removes the need to explicitly include the
VERSION.cmake file.