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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c378efee
Commit
c378efee
authored
Oct 13, 2023
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make perfschema.show_aggregate test more reliable
parent
e3e66a57
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
18 deletions
+12
-18
mysql-test/suite/perfschema/include/wait_for_pfs_thread_count.inc
...st/suite/perfschema/include/wait_for_pfs_thread_count.inc
+1
-12
mysql-test/suite/perfschema/r/show_aggregate.result
mysql-test/suite/perfschema/r/show_aggregate.result
+3
-3
mysql-test/suite/perfschema/t/show_aggregate.test
mysql-test/suite/perfschema/t/show_aggregate.test
+8
-3
No files found.
mysql-test/suite/perfschema/include/wait_for_pfs_thread_count.inc
View file @
c378efee
...
...
@@ -4,17 +4,6 @@
# Wait until there is only one session left, this one.
let
$wait_condition
=
select
count
(
*
)
=
1
from
information_schema
.
processlist
;
--
source
include
/
wait_condition
.
inc
# Threads are removed from information_schema.processlist
# very soon, but continue to execute in the server,
# before finally be removed from performance_schema.threads.
# Because instrumentation is optional, we use "<=" here.
let
$wait_condition
=
select
count
(
*
)
<=
2
from
performance_schema
.
threads
where
`TYPE`
=
'FOREGROUND'
;
let
$wait_condition
=
select
count
(
*
)
=
1
from
performance_schema
.
threads
where
`type`
=
'foreground'
;
--
source
include
/
wait_condition
.
inc
mysql-test/suite/perfschema/r/show_aggregate.result
View file @
c378efee
...
...
@@ -83,9 +83,9 @@ ROLLBACK;
connection default;
# Get thread ids for each connection.
USE performance_schema;
SELECT thread_id INTO @con1_id FROM threads WHERE processlist_user IN ('user1');
SELECT thread_id INTO @con2_id FROM threads WHERE processlist_user IN ('user2');
SELECT thread_id INTO @con3_id FROM threads WHERE processlist_user IN ('user3');
SELECT thread_id INTO @con1_id FROM threads WHERE processlist_user IN ('user1')
and processlist_id
;
SELECT thread_id INTO @con2_id FROM threads WHERE processlist_user IN ('user2')
and processlist_id
;
SELECT thread_id INTO @con3_id FROM threads WHERE processlist_user IN ('user3')
and processlist_id
;
#=================
# Global results
#=================
...
...
mysql-test/suite/perfschema/t/show_aggregate.test
View file @
c378efee
...
...
@@ -13,6 +13,7 @@
--
source
include
/
not_embedded
.
inc
--
source
include
/
no_protocol
.
inc
--
source
include
/
maybe_pool_of_threads
.
inc
--
source
include
/
wait_for_pfs_thread_count
.
inc
--
echo
#
--
echo
# ================================================================================
...
...
@@ -107,9 +108,9 @@ ROLLBACK;
connection
default
;
--
echo
# Get thread ids for each connection.
USE
performance_schema
;
SELECT
thread_id
INTO
@
con1_id
FROM
threads
WHERE
processlist_user
IN
(
'user1'
);
SELECT
thread_id
INTO
@
con2_id
FROM
threads
WHERE
processlist_user
IN
(
'user2'
);
SELECT
thread_id
INTO
@
con3_id
FROM
threads
WHERE
processlist_user
IN
(
'user3'
);
SELECT
thread_id
INTO
@
con1_id
FROM
threads
WHERE
processlist_user
IN
(
'user1'
)
and
processlist_id
;
SELECT
thread_id
INTO
@
con2_id
FROM
threads
WHERE
processlist_user
IN
(
'user2'
)
and
processlist_id
;
SELECT
thread_id
INTO
@
con3_id
FROM
threads
WHERE
processlist_user
IN
(
'user3'
)
and
processlist_id
;
--
source
../
include
/
show_aggregate
.
inc
...
...
@@ -201,6 +202,7 @@ ORDER BY variable_name;
disconnect
con1
;
disconnect
con2
;
disconnect
con3
;
--
echo
#
USE
test
;
--
echo
#
...
...
@@ -212,6 +214,9 @@ UPDATE test.status_results
h1
=
0
,
h2
=
0
,
h3
=
0
,
host
=
0
,
a1
=
0
,
a2
=
0
,
a3
=
0
,
acct
=
0
;
let
$wait_condition
=
select
count
(
*
)
=
0
from
performance_schema
.
threads
where
processlist_user
like
'user%'
and
processlist_id
;
--
source
include
/
wait_condition
.
inc
#--echo DEBUG
#SELECT * FROM test.status_results;
--
echo
#
...
...
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