summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2010-02-05 17:31:34 +0100
committerVladislav Vaintroub <vvaintroub@mysql.com>2010-02-05 17:31:34 +0100
commita129a22873ded2ea52b454ff321c33d80f94fb97 (patch)
tree6a99e28a95574daae8a2553366c74eb4054a8b33
parente6cba2be35506bce8b0655f6081ef3508464bbf9 (diff)
downloadmariadb-git-a129a22873ded2ea52b454ff321c33d80f94fb97.tar.gz
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.
-rw-r--r--mysql-test/r/show_profile.result10
-rw-r--r--mysql-test/t/show_profile.test18
2 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/show_profile.result b/mysql-test/r/show_profile.result
new file mode 100644
index 00000000000..67a07f6cfc9
--- /dev/null
+++ b/mysql-test/r/show_profile.result
@@ -0,0 +1,10 @@
+SET profiling = 1;
+SELECT 1;
+1
+1
+SHOW PROFILES;
+Query_ID Duration Query
+1 # SELECT 1
+SHOW PROFILE FOR QUERY 1;
+SHOW PROFILE CPU FOR QUERY 1;
+SET profiling = 0;
diff --git a/mysql-test/t/show_profile.test b/mysql-test/t/show_profile.test
new file mode 100644
index 00000000000..c20b29c40bf
--- /dev/null
+++ b/mysql-test/t/show_profile.test
@@ -0,0 +1,18 @@
+#
+# Test for show profiles
+# No meaningful check is possible.
+# So it only checks that SET profiling is possible and
+# that SHOW PROFILES, SHOW PROFILE FOR QUERY and SHOW PROFILE CPU FOR QUERY
+# do not cause syntax errors. It also increases code coverage for sql_profile.cc
+
+--source include/have_profiling.inc
+SET profiling = 1;
+SELECT 1;
+--replace_column 2 #
+SHOW PROFILES;
+--disable_result_log
+SHOW PROFILE FOR QUERY 1;
+SHOW PROFILE CPU FOR QUERY 1;
+--enable_result_log
+SET profiling = 0;
+