1SET @userstat_old= @@userstat; 2SET GLOBAL userstat=ON; 3CREATE USER mysqltest_1@localhost; 4GRANT USAGE ON *.* TO mysqltest_1@localhost WITH MAX_USER_CONNECTIONS 100; 5CREATE USER mysqltest_2@localhost; 6GRANT USAGE ON *.* TO mysqltest_2@localhost WITH MAX_USER_CONNECTIONS 100; 7SELECT 1; 81 91 10include/assert.inc [I_S.USER_STATISTICS CONCURRENT_CONNECTIONS: single connection] 11SELECT 1; 121 131 14include/assert.inc [I_S.USER_STATISTICS CONCURRENT_CONNECTIONS: two connections] 15include/assert.inc [I_S.USER_STATISTICS TOTAL_CONNECTIONS: two connections] 16include/assert.inc [I_S.USER_STATISTICS CONCURRENT_CONNECTIONS: handle disconnects] 17include/assert.inc [I_S.USER_STATISTICS TOTAL_CONNECTIONS: two connections after disconnect] 18SELECT 1; 191 201 21include/assert.inc [I_S.USER_STATISTICS CONCURRENT_CONNECTIONS: connections from other users] 22include/assert.inc [I_S.USER_STATISTICS TOTAL_CONNECTIONS: connections from other users] 23include/assert.inc [I_S.USER_STATISTICS CONCURRENT_CONNECTIONS: no connections - zero concurrency] 24set password for mysqltest_2@"localhost" = password('foo'); 25ERROR 28000: Access denied for user 'mysqltest_2'@'localhost' (using password: NO) 26include/assert.inc [I_S.USER_STATISTICS CONCURRENT_CONNECTIONS: wrong password connection] 27include/assert.inc [I_S.USER_STATISTICS TOTAL_CONNECTIONS: failed connection] 28include/assert.inc [I_S.USER_STATISTICS DENIED_CONNECTIONS: failed connection] 29SELECT 1; 301 311 32FLUSH USER_STATISTICS; 33SELECT 1; 341 351 36include/assert.inc [I_S.USER_STATISTICS CONCURRENT_CONNECTIONS: single connection after flush] 37SET GLOBAL userstat=0; 38SET GLOBAL userstat=1; 39FLUSH USER_STATISTICS; 40SELECT 1; 411 421 43include/assert.inc [I_S.USER_STATISTICS CONCURRENT_CONNECTIONS: two connections after userstat=1] 44SET GLOBAL userstat=0; 45SET GLOBAL userstat=1; 46FLUSH CLIENT_STATISTICS; 47SELECT 1; 481 491 50include/assert.inc [I_S.CLIENT_STATISTICS CONCURRENT_CONNECTIONS: two connections after userstat=1] 51ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'foo' 52include/assert.inc [I_S.USER_STATISTICS ACCESS_DENIED: counts previous error] 53DROP USER mysqltest_1@localhost; 54DROP USER mysqltest_2@localhost; 55SET GLOBAL userstat= @userstat_old; 56