mysqltest command 'shutdown_server' is supposed to shutdown the server
and wait for it to be gone, and kill it when timeout. But because the
arguments passed to my_kill were in the wrong order, 'shutdown_server'
does not wait nor kill the server at all. So after 'shutdown_server',
the server is still running, and the server may still accepting
connections.
mysql-test/include/mtr_warnings.sql:
Suppress forcing close thread messages when server shuts down
mysql-test/include/restart_mysqld.inc:
wait_until_disconnected.inc is not required after fix shutdown_server command
1. mysqltest.cc - added flush to log file after each executed command in a testcase.
2. mtr shows 20 last lines from test case log file if timeout reached.
3. Optimizing the code by Magnus review.
4. It is partially fix bug#40150
Problem: In the mysqltest language, it was not possible to set the current
connection from a variable, and it was not possible to read the current
connection.
Fix: Allow setting the connection from a variable, like:
connection $variable;
and introduce the mysqltest language variable $CURRENT_CONNECTION, which
holds the name of the current connection.
client/mysqltest.cc:
- Made select_connection use the common argument parser instead of its own
home-rolled version. That allows variable expansion, for instance.
- Made select_connection_name set the variable $CURRENT_CONNECTION, so that
test scripts can use that.
- Refactored a bit so that stuff that needs to be done when changing connection
is located to one place.
mysql-test/t/mysqltest.test:
Added test case for $CURRENT_CONNECTION and "connection $variable"