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
23ebccac
Commit
23ebccac
authored
Feb 06, 2008
by
hhunger@hh-nb.hungers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed differences in STATE in result file for bug#34190.
parent
5817cec5
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
117 deletions
+64
-117
.bzrignore
.bzrignore
+1
-0
mysql-test/suite/funcs_1/datadict/processlist_val.inc
mysql-test/suite/funcs_1/datadict/processlist_val.inc
+27
-37
mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result
mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result
+18
-40
mysql-test/suite/funcs_1/r/b_processlist_val_ps.result
mysql-test/suite/funcs_1/r/b_processlist_val_ps.result
+18
-40
No files found.
.bzrignore
View file @
23ebccac
...
@@ -3018,3 +3018,4 @@ mysql-test/suite/funcs_1.tar.gz
...
@@ -3018,3 +3018,4 @@ mysql-test/suite/funcs_1.tar.gz
mysql-test/.DS_Store
mysql-test/.DS_Store
.DS_Store
.DS_Store
libmysqld/sql_profile.cc
libmysqld/sql_profile.cc
mysql-test/suite/funcs_1.tar.zip
mysql-test/suite/funcs_1/datadict/processlist_val.inc
View file @
23ebccac
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# #
# #
# Testing of values within INFORMATION_SCHEMA.PROCESSLIST #
# Testing of values within INFORMATION_SCHEMA.PROCESSLIST #
# #
# #
# Ensure that the values fit to the current
state
of the connection #
# Ensure that the values fit to the current
event
of the connection #
# and especially that they change if a connection does nothing or #
# and especially that they change if a connection does nothing or #
# runs some SQL. #
# runs some SQL. #
# Examples: #
# Examples: #
...
@@ -32,7 +32,9 @@
...
@@ -32,7 +32,9 @@
# Creation: #
# Creation: #
# 2007-08-09 mleich Implement this test as part of #
# 2007-08-09 mleich Implement this test as part of #
# WL#3982 Test information_schema.processlist #
# WL#3982 Test information_schema.processlist #
# #
# 2008-01-05 HHunger Changed time test and long statement test. #
# It could happen that the long statement test #
# fail due to timing problems. # # #
########################################################################
########################################################################
# Basic preparations
# Basic preparations
...
@@ -108,29 +110,22 @@ connection default;
...
@@ -108,29 +110,22 @@ connection default;
# - State IS NULL
# - State IS NULL
# - INFO must be empty
# - INFO must be empty
#
#
let
$wait_condition
=
SELECT
COUNT
(
*
)
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
let
$wait_condition
=
SELECT
id
,
user
,
host
,
db
,
command
,
@
time
:=
time
,
state
,
info
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
COMMAND
=
'Sleep'
AND
TIME
>
0
;
WHERE
COMMAND
=
'Sleep'
AND
TIME
>
0
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
#
#
# Expect to hit TIME = 1.
# Expect to hit TIME > 1.
--
replace_column
1
<
ID
>
SELECT
@
time
>
0
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
;
# Change the SQL command (affects content of INFO)
--
replace_column
1
<
ID
>
SHOW
FULL
PROCESSLIST
;
#
#
--
echo
# Sleep some time
--
echo
# Sleep some time
# The value of TIME must increase and reach 2 after some sleeps.
# The value of TIME must increase and reach 2 after some sleeps.
let
$wait_timeout
=
2
;
let
$wait_timeout
=
4
;
let
$wait_condition
=
SELECT
COUNT
(
*
)
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
let
$wait_condition
=
SELECT
id
,
user
,
host
,
db
,
command
,
@
time2
:=
time
,
state
,
info
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
TIME
>
1
;
WHERE
TIME
>
@
time
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
#
#
# Expect to hit TIME = 2.
# Expect to hit TIME > @time
--
replace_column
1
<
ID
>
SELECT
@
time
<
@
time2
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
;
--
replace_column
1
<
ID
>
SHOW
FULL
PROCESSLIST
;
#
#
#
#
# The second connection must have an ID = my ID + 1;
# The second connection must have an ID = my ID + 1;
...
@@ -201,28 +196,22 @@ connection default;
...
@@ -201,28 +196,22 @@ connection default;
--
echo
# Sleep some time
--
echo
# Sleep some time
# The command must be after some time in work by the server.
# The command must be after some time in work by the server.
# So poll till INFO is no more NULL and TIME > 0.
# So poll till INFO is no more NULL and TIME > 0.
let
$wait_condition
=
SELECT
COUNT
(
*
)
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
let
$wait_condition
=
SELECT
id
,
user
,
host
,
db
,
command
,
@
time
:=
time
,
state
,
info
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
INFO
IS
NOT
NULL
AND
TIME
>
0
;
WHERE
INFO
IS
NOT
NULL
AND
TIME
>
0
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
#
#
# Expect to see TIME = 1
# Expect to see TIME > 0;
--
replace_column
1
<
ID
>
SELECT
@
time
>
0
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
;
--
replace_column
1
<
ID
>
SHOW
FULL
PROCESSLIST
;
#
#
--
echo
# Sleep some time
--
echo
# Sleep some time
# The value of TIME must increase and reach 2 after some sleeps.
# The value of TIME must increase and reach 2 after some sleeps.
let
$wait_timeout
=
2
;
let
$wait_timeout
=
2
;
let
$wait_condition
=
SELECT
COUNT
(
*
)
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
let
$wait_condition
=
SELECT
id
,
user
,
host
,
db
,
command
,
@
time2
:=
time
,
state
,
info
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
TIME
>
1
;
WHERE
TIME
>
@
time
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
#
#
# Expect to see TIME = 2
# Expect to see @time < @time2
--
replace_column
1
<
ID
>
SELECT
@
time
<
@
time2
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
;
--
replace_column
1
<
ID
>
SHOW
FULL
PROCESSLIST
;
#
#
--
echo
--
echo
--
echo
-----
switch
to
connection
ddicttestuser1
(
user
=
ddicttestuser1
)
-----
--
echo
-----
switch
to
connection
ddicttestuser1
(
user
=
ddicttestuser1
)
-----
...
@@ -247,19 +236,20 @@ connection default;
...
@@ -247,19 +236,20 @@ connection default;
--
echo
# Sleep some time
--
echo
# Sleep some time
# The command must be after some time in work by the server.
# The command must be after some time in work by the server.
# There is a short phase with STATE IS NULL followed by a longer phase
# There is a short phase with STATE IS NULL followed by a longer phase
# with STATE = 'init'.
# with STATE = 'executing'.
# So poll till INFO is no more NULL AND STATE = 'init'.
# So poll till INFO is no more NULL AND STATE = 'executing'.
let
$wait_timeout
=
9
;
let
$wait_condition
=
SELECT
COUNT
(
*
)
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
let
$wait_condition
=
SELECT
COUNT
(
*
)
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
INFO
IS
NOT
NULL
AND
STATE
=
'init
'
;
WHERE
INFO
IS
NOT
NULL
AND
STATE
=
'executing
'
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
#
#
# Expect to see that SELECT/SHOW PROCESSLIST can handle my statement monster.
# Expect to see that SELECT/SHOW PROCESSLIST can handle my statement monster.
--
replace_column
1
<
ID
>
6
<
TIM
E
>
--
replace_column
1
<
ID
>
5
<
COMMAND
>
6
<
TIME
>
7
<
STAT
E
>
SELECT
*
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
;
--
replace_column
1
<
ID
>
6
<
TIM
E
>
--
replace_column
1
<
ID
>
5
<
COMMAND
>
6
<
TIME
>
7
<
STAT
E
>
SHOW
FULL
PROCESSLIST
;
SHOW
FULL
PROCESSLIST
;
# SHOW PROCESSLIST truncates INFO after 100 characters.
# SHOW PROCESSLIST truncates INFO after 100 characters.
--
replace_column
1
<
ID
>
6
<
TIM
E
>
--
replace_column
1
<
ID
>
5
<
COMMAND
>
6
<
TIME
>
7
<
STAT
E
>
SHOW
PROCESSLIST
;
SHOW
PROCESSLIST
;
--
echo
--
echo
--
echo
-----
switch
to
connection
ddicttestuser1
(
user
=
ddicttestuser1
)
-----
--
echo
-----
switch
to
connection
ddicttestuser1
(
user
=
ddicttestuser1
)
-----
...
@@ -267,7 +257,6 @@ connection ddicttestuser1;
...
@@ -267,7 +257,6 @@ connection ddicttestuser1;
--
echo
# Pull("reap") the result set from the monster statement executed with "send".
--
echo
# Pull("reap") the result set from the monster statement executed with "send".
reap
;
reap
;
# Ensure that we see that a connection "hangs" when colliding with a
# Ensure that we see that a connection "hangs" when colliding with a
# WRITE TABLE LOCK
# WRITE TABLE LOCK
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
...
@@ -289,6 +278,7 @@ connection default;
...
@@ -289,6 +278,7 @@ connection default;
--
echo
# Sleep some time
--
echo
# Sleep some time
# The command must be after some time in work by the server.
# The command must be after some time in work by the server.
# So poll till INFO is no more NULL.
# So poll till INFO is no more NULL.
let
$wait_timeout
=
4
;
let
$wait_condition
=
SELECT
COUNT
(
*
)
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
let
$wait_condition
=
SELECT
COUNT
(
*
)
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
INFO
IS
NOT
NULL
AND
STATE
=
'Locked'
;
WHERE
INFO
IS
NOT
NULL
AND
STATE
=
'Locked'
;
--
source
include
/
wait_condition
.
inc
--
source
include
/
wait_condition
.
inc
...
...
mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result
View file @
23ebccac
This diff is collapsed.
Click to expand it.
mysql-test/suite/funcs_1/r/b_processlist_val_ps.result
View file @
23ebccac
This diff is collapsed.
Click to expand it.
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