The test is composed of a few parts.
1: Test that failover happens on master failure.
2: Test that a server with slave sql thread stopped is not promoted.
3: Test that a server with log_slave_updates=1 is promoted before others.
The crash happens if the slave is not configured for replication or the
connection is broken when results are read. Adding missing return value
checks will fix it.
The ssh_node function now supports printf style arguments. This is used to
simplify command execution on the nodes.
Curreltny, in addition to its old usage, it is used to drop extra
databases when replication is started.
When a backend is waiting for a response but no statement is stored for
the session, the buffer where the stored statement is copied is not
modified. This means that it needs to be initialized to a NULL value.
Added a test that checks that the behavior works as expected even with
persistent connections. A second test reproduces the crash by executing
parallel SET commands while slaves are blocked.
There is still a behavioral problem in readwritesplit. If a session
command is being executed and it fails on a slave, an error is sent to the
client. In this case it would not be necessary to close the session if the
master is still alive.