403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/suite/sys_vars/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/suite/sys_vars/t/max_user_connections_func.test
############# mysql-test\t\max_user_connections_func.test ####################
#                                                                            #
# Variable Name: max_user_connections                                        #
# Scope: SESSION                                                             #
# Access Type: Dynamic                                                       #
# Data Type: NUMERIC                                                         #
# Default Value: -                                                           #
# Values:       1-4294967295                                                 #
#                                                                            #
#                                                                            #
# Creation Date: 2008-03-02                                                  #
# Author:  Sharique Abdullah                                                 #
#                                                                            #
# Description: Test Cases of Dynamic System Variable "max_user_connections   #
#              that checks behavior of this variable in the following ways   #
#              * Functionality based on different values                     #
#                                                                            #
# Reference:                                                                 #
#    http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html     #
# option_mysqld_max_user_connections                                         #
#                                                                            #
# Modified: 2008-07-10 HHUNGER: Inserted wait condition                      #
#                                                                            #
##############################################################################

--echo ** Setup **
--echo
#
# Setup
#

--source include/not_embedded.inc

SET @default_max_user_connections = @@global.max_user_connections;

###################################
#Setting value max_user_connection#
###################################

Set Global max_user_connections=2;

CREATE USER test@localhost;
GRANT USAGE on *.* TO test@localhost;

--echo '#--------------------FN_DYNVARS_114_01-------------------------#'
########################################
#Should not make more then 2 connection#
########################################

CONNECT (conn1,localhost,test,,);

CONNECT (conn2,localhost,test,,);

--disable_query_log
--Error ER_TOO_MANY_USER_CONNECTIONS
CONNECT (conn3,localhost,test,,);
--enable_query_log
--echo Expected error "too many connections"

DISCONNECT conn1;

--echo ** Poll till disconnected conn1 disappears from processlist
let $wait_condition= SELECT count(id) <= 2
   FROM information_schema.processlist WHERE user = 'test';
--source include/wait_condition.inc

--echo '#--------------------FN_DYNVARS_114_02-------------------------#'
#####################################################
#Set value to 3 and see if 3 connections can be made#
#####################################################

connection default;
Set Global max_user_connections=3;
CONNECT (conn5,localhost,test,,);
CONNECT (conn6,localhost,test,,);

#
# Cleanup
#

CONNECTION default;

DISCONNECT conn2;
DISCONNECT conn5;
DISCONNECT conn6;

drop user test@localhost;

SET @@global.max_user_connections = @default_max_user_connections;

Youez - 2016 - github.com/yon3zu
LinuXploit