Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
6d05a62e
Commit
6d05a62e
authored
Jul 11, 2008
by
Horst Hunger
Browse files
Options
Browse Files
Download
Plain Diff
Fix of Bug#37997. Polling until disconnect is not more in the processlist
parents
9cc31df3
52f510ef
9cc31df3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
20 deletions
+18
-20
mysql-test/r/max_user_connections_func.result
mysql-test/r/max_user_connections_func.result
+3
-2
mysql-test/t/max_user_connections_func.test
mysql-test/t/max_user_connections_func.test
+15
-18
No files found.
mysql-test/r/max_user_connections_func.result
View file @
6d05a62e
** Setup **
SET @default_max_user_connections = @@max_user_connections;
SET @default_max_user_connections = @@
global.
max_user_connections;
Set Global max_user_connections=2;
'#--------------------FN_DYNVARS_114_01-------------------------#'
** Connecting conn1 using username 'root' **
...
...
@@ -9,10 +9,11 @@ Set Global max_user_connections=2;
ERROR 42000: User root already has more than 'max_user_connections' active connections
Expected error "too many connections"
** Disconnecting conn1 **
** Poll till disconnected conn1 disappears from processlist
'#--------------------FN_DYNVARS_114_02-------------------------#'
Set Global max_user_connections=3;
** Connecting conn5 using username 'root' **
** Connecting conn6 using username 'root' **
** Connection default **
** Disconnecting conn5, conn6 **
SET
GLOBAL
max_user_connections = @default_max_user_connections;
SET
@@global.
max_user_connections = @default_max_user_connections;
mysql-test/t/max_user_connections_func.test
View file @
6d05a62e
...
...
@@ -9,15 +9,18 @@
# #
# #
# Creation Date: 2008-03-02 #
# Author: Sharique Abdullah
#
# 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
# 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
**
...
...
@@ -28,8 +31,7 @@
--
source
include
/
not_embedded
.
inc
SET
@
default_max_user_connections
=
@@
max_user_connections
;
SET
@
default_max_user_connections
=
@@
global
.
max_user_connections
;
###################################
#Setting value max_user_connection#
...
...
@@ -37,13 +39,10 @@ SET @default_max_user_connections = @@max_user_connections;
Set
Global
max_user_connections
=
2
;
--
echo
'#--------------------FN_DYNVARS_114_01-------------------------#'
#######################################
#should not make more then 2 connection#
#######################################
########################################
#Should not make more then 2 connection#
########################################
--
echo
**
Connecting
conn1
using
username
'root'
**
CONNECT
(
conn1
,
localhost
,
root
,,);
...
...
@@ -61,22 +60,22 @@ CONNECT (conn3,localhost,root,,);
--
echo
**
Disconnecting
conn1
**
DISCONNECT
conn1
;
--
echo
**
Poll
till
disconnected
conn1
disappears
from
processlist
let
$wait_condition
=
SELECT
count
(
id
)
<=
2
FROM
information_schema
.
processlist
WHERE
user
=
'root'
;
--
source
include
/
wait_condition
.
inc
--
echo
'#--------------------FN_DYNVARS_114_02-------------------------#'
#####################################################
#
s
et value to 3 and see if 3 connections can be made#
#
S
et value to 3 and see if 3 connections can be made#
#####################################################
Set
Global
max_user_connections
=
3
;
--
echo
**
Connecting
conn5
using
username
'root'
**
CONNECT
(
conn5
,
localhost
,
root
,,);
--
echo
**
Connecting
conn6
using
username
'root'
**
CONNECT
(
conn6
,
localhost
,
root
,,);
#
# Cleanup
#
...
...
@@ -89,7 +88,5 @@ DISCONNECT conn2;
DISCONNECT
conn5
;
DISCONNECT
conn6
;
SET
GLOBAL
max_user_connections
=
@
default_max_user_connections
;
SET
@@
global
.
max_user_connections
=
@
default_max_user_connections
;
--
disable_info
--
enable_warnings
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment