1SET GLOBAL max_connections=1;
2CREATE USER nonprivuser@localhost;
3SET GLOBAL LOG_WARNINGS = 0;
4connect(localhost,root,,test,port,socket);
5ERROR HY000: Too many connections
6[log_grep.inc] file: percona_log_connection_error.err pattern: Too many connections
7[log_grep.inc] lines:   0
8SET GLOBAL LOG_WARNINGS = 1;
9connect(localhost,root,,test,port,socket);
10ERROR HY000: Too many connections
11[log_grep.inc] file: percona_log_connection_error.err pattern: Too many connections
12[log_grep.inc] lines:   1
13SET GLOBAL LOG_WARNINGS = 0;
14connect(localhost,root,,test,port,socket);
15ERROR HY000: Too many connections
16[log_grep.inc] file: percona_log_connection_error.err pattern: Too many connections
17[log_grep.inc] lines:   1
18#
19# Bug 1583553: Error log "Too many connections" warning is not printed for the first after the limit non-SUPER login attempt
20#
21SET GLOBAL LOG_WARNINGS = 1;
22connect(localhost,nonprivuser,,test,port,socket);
23ERROR 08004: Too many connections
24[log_grep.inc] file: percona_log_connection_error.err pattern: Too many connections
25[log_grep.inc] lines:   2
26DROP USER nonprivuser@localhost;
27