Debian Codegraph @

mysql-test/suite/connection_control/r/connection_delay_invalid_users.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 # Save original values of connection_control variables
10 SET @saved_connections_threshold = @@global.connection_control_failed_connections_threshold;
11 SET @saved_max_delay = @@global.connection_control_max_connection_delay;
12 # Set small values for connection_control variables
13 SET @@global.connection_control_failed_connections_threshold = 3;
14 SET @@global.connection_control_max_connection_delay = 1000;
15
16 # ----------------------------------------------------------------------
17
18 # Following attempts will not experience any delay in server respose
19 # Connection attempt should fail.
20 Connection_control_delay_generated should be 0
21 Variable_name Value
22 Connection_control_delay_generated 0
23 # Connection attempt should fail.
24 Connection_control_delay_generated should be 0
25 Variable_name Value
26 Connection_control_delay_generated 0
27 # Connection attempt should fail.
28 Connection_control_delay_generated should be 0
29 Variable_name Value
30 Connection_control_delay_generated 0
31 # Connection attempt should fail.
32 Connection_control_delay_generated should be 0
33 Variable_name Value
34 Connection_control_delay_generated 0
35 # Connection attempt should fail.
36 Connection_control_delay_generated should be 0
37 Variable_name Value
38 Connection_control_delay_generated 0
39 # Connection attempt should fail.
40 Connection_control_delay_generated should be 0
41 Variable_name Value
42 Connection_control_delay_generated 0
43 # Connection attempt should fail.
44 Connection_control_delay_generated should be 0
45 Variable_name Value
46 Connection_control_delay_generated 0
47 # Connection attempt should fail.
48 Connection_control_delay_generated should be 0
49 Variable_name Value
50 Connection_control_delay_generated 0
51 # Connection attempt should fail.
52 Connection_control_delay_generated should be 0
53 Variable_name Value
54 Connection_control_delay_generated 0
55
56 # Following attempts will experience delay in server respose
57 # Connection attempt should fail.
58 Connection_control_delay_generated should be 1
59 Variable_name Value
60 Connection_control_delay_generated 1
61 # Connection attempt should fail.
62 Connection_control_delay_generated should be 2
63 Variable_name Value
64 Connection_control_delay_generated 2
65 # Connection attempt should fail.
66 Connection_control_delay_generated should be 3
67 Variable_name Value
68 Connection_control_delay_generated 3
69 SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
70 USERHOST FAILED_ATTEMPTS
71 'u1'@'localhost' 4
72 'u2'@'localhost' 4
73 'u3'@'localhost' 4
74 # Connection attempt should fail.
75 Connection_control_delay_generated should be 4
76 Variable_name Value
77 Connection_control_delay_generated 4
78 # Connection attempt should fail.
79 Connection_control_delay_generated should be 5
80 Variable_name Value
81 Connection_control_delay_generated 5
82 # Connection attempt should fail.
83 Connection_control_delay_generated should be 6
84 Variable_name Value
85 Connection_control_delay_generated 6
86 SELECT * FROM INFORMATION_SCHEMA.connection_control_failed_login_attempts;
87 USERHOST FAILED_ATTEMPTS
88 'u1'@'localhost' 5
89 'u2'@'localhost' 5
90 'u3'@'localhost' 5
91
92 # ----------------------------------------------------------------------
93
94 # Cleanup
95 # Restore original values of conenction_control variables
96 SET @@global.connection_control_failed_connections_threshold = @saved_connections_threshold;
97 SET @@global.connection_control_max_connection_delay = @saved_max_delay;
98 # Uninstall connection_control plugin
99 UNINSTALL PLUGIN connection_control;
100 UNINSTALL PLUGIN connection_control_failed_login_attempts;
101
102 # ----------------------------------------------------------------------