| 1 |
# This test checks if entry of an unauthenticated_user is |
| 2 |
# present in performance_schema.processlist when connection is |
| 3 |
# delayed through connection_control plugin |
| 4 |
|
| 5 |
--source include/not_windows.inc |
| 6 |
--source ../inc/have_connection_control_plugin.inc |
| 7 |
--echo # Setup |
| 8 |
--source ../inc/install_connection_control_plugin.inc |
| 9 |
|
| 10 |
--echo # Save original values of connection_control variables |
| 11 |
SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold; |
| 12 |
SET @saved_min_delay = @@global.connection_control_min_connection_delay; |
| 13 |
|
| 14 |
--echo # set connection_control variables |
| 15 |
SET @@global.connection_control_failed_connections_threshold = 1; |
| 16 |
SET @@global.connection_control_min_connection_delay = 2000; |
| 17 |
|
| 18 |
# Delayed connection |
| 19 |
--exec $MYSQL --user=unauthenticated_user --port=$MASTER_MYPORT --protocol=tcp > /dev/null 2>&1 & |
| 20 |
--exec $MYSQL --user=unauthenticated_user --port=$MASTER_MYPORT --protocol=tcp > /dev/null 2>&1 & |
| 21 |
|
| 22 |
--sleep 2 |
| 23 |
|
| 24 |
--echo # processlist output |
| 25 |
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State> |
| 26 |
--replace_regex /Daemon/<Command>/ /Connect/<Command>/ /Sleep/<Command>/ |
| 27 |
select * from performance_schema.processlist where user='unauthenticated_user'; |
| 28 |
|
| 29 |
--echo # Cleanup |
| 30 |
SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold; |
| 31 |
SET @@global.connection_control_min_connection_delay = @saved_min_delay; |
| 32 |
--source ../inc/uninstall_connection_control_plugin.inc |