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
9580c05c
Commit
9580c05c
authored
May 23, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make wait_timeout test not timing dependent
parent
b9779e9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
4 deletions
+64
-4
mysql-test/t/wait_timeout.test
mysql-test/t/wait_timeout.test
+64
-4
No files found.
mysql-test/t/wait_timeout.test
View file @
9580c05c
...
...
@@ -4,10 +4,41 @@
#
# Bug #8731: wait_timeout does not work on Mac OS X
#
# Connect with another connection and reset counters
--
disable_query_log
connect
(
wait_con
,
localhost
,
root
,,
test
,,);
flush
status
;
# Reset counters
connection
wait_con
;
let
$retries
=
300
;
let
$aborted_clients
=
`SHOW STATUS LIKE 'aborted_clients'`
;
set
@
aborted_clients
=
0
;
--
enable_query_log
# Disable reconnect and do the query
connection
default
;
--
disable_reconnect
select
1
;
# wait_timeout is 1, so we should get disconnected now
--
sleep
2
# Switch to wait_con and wait until server has aborted the connection
--
disable_query_log
connection
wait_con
;
while
(
!
`select @aborted_clients`
)
{
sleep
0.1
;
let
$aborted_clients
=
`SHOW STATUS LIKE 'aborted_clients'`
;
eval
set
@
aborted_clients
=
SUBSTRING
(
'$aborted_clients'
,
16
)
+
0
;
dec
$retries
;
if
(
!
$retries
)
{
Failed
to
detect
that
client
has
been
aborted
;
}
}
--
enable_query_log
connection
default
;
# When the connection is closed in this way, the error code should
# be consistent see bug#2845 for an explanation
--
error
2006
...
...
@@ -15,12 +46,41 @@ select 2;
--
enable_reconnect
select
3
;
#
# Do the same test as above on a TCP connection
# (which we get by specifying a ip adress)
# Connect with another connection and reset counters
--
disable_query_log
connection
wait_con
;
flush
status
;
# Reset counters
let
$retries
=
300
;
let
$aborted_clients
=
`SHOW STATUS LIKE 'aborted_clients'`
;
set
@
aborted_clients
=
0
;
--
enable_query_log
connect
(
con1
,
127.0
.
0.1
,
root
,,
test
,
$MASTER_MYPORT
,);
--
disable_reconnect
select
1
;
# wait_timeout is 1, so we should get disconnected now
--
sleep
2
# Switch to wait_con and wait until server has aborted the connection
--
disable_query_log
connection
wait_con
;
while
(
!
`select @aborted_clients`
)
{
sleep
0.1
;
let
$aborted_clients
=
`SHOW STATUS LIKE 'aborted_clients'`
;
eval
set
@
aborted_clients
=
SUBSTRING
(
'$aborted_clients'
,
16
)
+
0
;
dec
$retries
;
if
(
!
$retries
)
{
Failed
to
detect
that
client
has
been
aborted
;
}
}
--
enable_query_log
connection
con1
;
# When the connection is closed in this way, the error code should
# be consistent see bug#2845 for an explanation
--
error
2006
...
...
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