| 1 |
** Setup ** |
| 2 |
|
| 3 |
SET @default_max_user_connections = @@global.max_user_connections; |
| 4 |
Set Global max_user_connections=2; |
| 5 |
CREATE USER test@localhost; |
| 6 |
GRANT USAGE on *.* TO test@localhost; |
| 7 |
'#--------------------FN_DYNVARS_114_01-------------------------#' |
| 8 |
CONNECT conn1,localhost,test,,; |
| 9 |
CONNECT conn2,localhost,test,,; |
| 10 |
ERROR 42000: User test already has more than 'max_user_connections' active connections |
| 11 |
Expected error "too many connections" |
| 12 |
disconnect conn1; |
| 13 |
** Poll till disconnected conn1 disappears from processlist |
| 14 |
'#--------------------FN_DYNVARS_114_02-------------------------#' |
| 15 |
connection default; |
| 16 |
Set Global max_user_connections=3; |
| 17 |
CONNECT conn5,localhost,test,,; |
| 18 |
CONNECT conn6,localhost,test,,; |
| 19 |
connection default; |
| 20 |
disconnect conn2; |
| 21 |
disconnect conn5; |
| 22 |
disconnect conn6; |
| 23 |
drop user test@localhost; |
| 24 |
SET @@global.max_user_connections = @default_max_user_connections; |