Debian Codegraph @

mysql-test/suite/connection_control/r/connection_delay_anonymous_user.result

raw
1 # Connection delay tests for valid user accounts
2
3 # ----------------------------------------------------------------------
4
5 # Setup
6 # Install connection_control plugin
7 INSTALL PLUGIN connection_control SONAME 'CONNECTION_CONTROL_LIB';
8 INSTALL PLUGIN connection_control_failed_login_attempts SONAME 'CONNECTION_CONTROL_LIB';
9 # Create anonymous user
10 CREATE USER ''@'localhost';
11 # Save original values of connection_control variables
12 SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
13 SET @saved_max_delay = @@global.connection_control_max_connection_delay;
14 # Set small values for connection_control variables
15 SET @@global.connection_control_failed_connections_threshold = 3;
16 SET @global.connection_control_max_connection_delay = 1000;
17
18 # ----------------------------------------------------------------------
19
20 # Following attempts will not experience any delay in server respose
21 # Connection attempt should fail.
22 Connection_control_delay_generated should be 0
23 Variable_name Value
24 Connection_control_delay_generated 0
25 # Connection attempt should fail.
26 Connection_control_delay_generated should be 0
27 Variable_name Value
28 Connection_control_delay_generated 0
29 # Connection attempt should fail.
30 Connection_control_delay_generated should be 0
31 Variable_name Value
32 Connection_control_delay_generated 0
33
34 # Following attempts will experience delay in server respose
35 # Connection attempt should fail.
36 Connection_control_delay_generated should be 1
37 Variable_name Value
38 Connection_control_delay_generated 1
39 # Connection attempt should fail.
40 Connection_control_delay_generated should be 2
41 Variable_name Value
42 Connection_control_delay_generated 2
43 # Connection attempt should fail.
44 Connection_control_delay_generated should be 3
45 Variable_name Value
46 Connection_control_delay_generated 3
47
48 # ----------------------------------------------------------------------
49
50 # Cleanup
51 # Restore original values of conenction_control variables
52 SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
53 SET @@global.connection_control_max_connection_delay = @saved_max_delay;
54 # Drop anonymous user
55 DROP USER ''@'localhost';
56 # Uninstall connection_control plugin
57 UNINSTALL PLUGIN connection_control;
58 UNINSTALL PLUGIN connection_control_failed_login_attempts;
59
60 # ----------------------------------------------------------------------