Skip to content

Commit a5548f3

Browse files
committed
Bug#50057: SHOW PROFILE CPU for Windows
On QA request, adding test that causes new code to be called. Even if we cannot validate the result, this will at least increase the code coverage.
1 parent fe6f55d commit a5548f3

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

mysql-test/r/show_profile.result

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
SET profiling = 1;
2+
SELECT 1;
3+
1
4+
1
5+
SHOW PROFILES;
6+
Query_ID Duration Query
7+
1 # SELECT 1
8+
SHOW PROFILE FOR QUERY 1;
9+
SHOW PROFILE CPU FOR QUERY 1;
10+
SET profiling = 0;

mysql-test/t/show_profile.test

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Test for show profiles
3+
# No meaningful check is possible.
4+
# So it only checks that SET profiling is possible and
5+
# that SHOW PROFILES, SHOW PROFILE FOR QUERY and SHOW PROFILE CPU FOR QUERY
6+
# do not cause syntax errors. It also increases code coverage for sql_profile.cc
7+
8+
--source include/have_profiling.inc
9+
SET profiling = 1;
10+
SELECT 1;
11+
--replace_column 2 #
12+
SHOW PROFILES;
13+
--disable_result_log
14+
SHOW PROFILE FOR QUERY 1;
15+
SHOW PROFILE CPU FOR QUERY 1;
16+
--enable_result_log
17+
SET profiling = 0;
18+

0 commit comments

Comments
 (0)