summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2015-01-21 14:53:40 +0100
committerSergei Golubchik <sergii@pisem.net>2015-01-21 14:53:40 +0100
commitb0a8e0735746245e00eb4a57e83ebffdc4fee7ea (patch)
tree5a938ca57ed5edf58ab7e455e83006b35b525bf9 /mysql-test
parent78e131d4930bb028839d2ede0341f134c545b750 (diff)
parent05c002d0ffc003dfe6646f785dabef0c440da3d1 (diff)
downloadmariadb-git-b0a8e0735746245e00eb4a57e83ebffdc4fee7ea.tar.gz
P_S 5.6.22
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/perfschema/r/unary_digest.result47
-rw-r--r--mysql-test/suite/perfschema/t/unary_digest.test98
2 files changed, 145 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/r/unary_digest.result b/mysql-test/suite/perfschema/r/unary_digest.result
new file mode 100644
index 00000000000..40fcc026fad
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/unary_digest.result
@@ -0,0 +1,47 @@
+TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
+ERROR 42S02: Table 'test.expect_unary' doesn't exist
+ERROR 42S02: Table 'test.expect_unary' doesn't exist
+ERROR 42S02: Table 'test.expect_unary' doesn't exist
+ERROR 42S02: Table 'test.expect_unary' doesn't exist
+ERROR 42S02: Table 'test.expect_unary' doesn't exist
+ERROR 42S02: Table 'test.expect_binary' doesn't exist
+ERROR 42S02: Table 'test.expect_binary' doesn't exist
+ERROR 42S02: Table 'test.expect_binary' doesn't exist
+ERROR 42S02: Table 'test.expect_binary' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_full_reduce' doesn't exist
+ERROR 42S02: Table 'test.expect_unchanged' doesn't exist
+SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR
+FROM performance_schema.events_statements_summary_by_digest;
+SCHEMA_NAME DIGEST_TEXT COUNT_STAR
+test TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1
+test SELECT ? FROM expect_unary 5
+test SELECT ? + ? FROM expect_binary 2
+test SELECT ? - ? FROM expect_binary 2
+test INSERT INTO expect_full_reduce VALUES (...) 27
+test SELECT a - b , a + b , - a , - b , + a , + b FROM expect_unchanged 1
diff --git a/mysql-test/suite/perfschema/t/unary_digest.test b/mysql-test/suite/perfschema/t/unary_digest.test
new file mode 100644
index 00000000000..c4583484f36
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/unary_digest.test
@@ -0,0 +1,98 @@
+# ----------------------------------------------------
+# Tests for the performance schema statement Digests.
+# ----------------------------------------------------
+
+# Test case to show behavior of statements digest when
+# statement-digest-size is 0
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source ../include/no_protocol.inc
+
+TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
+
+--disable_query_log
+
+--error ER_NO_SUCH_TABLE
+select 1 from expect_unary;
+--error ER_NO_SUCH_TABLE
+select +1 from expect_unary;
+--error ER_NO_SUCH_TABLE
+select -1 from expect_unary;
+--error ER_NO_SUCH_TABLE
+select ++++++++++++++++++++++++++++++++++++++++++++++++1 from expect_unary;
+--error ER_NO_SUCH_TABLE
+select ------------------------------------------------1 from expect_unary;
+
+--error ER_NO_SUCH_TABLE
+select 0+1 from expect_binary;
+--error ER_NO_SUCH_TABLE
+select 0-1 from expect_binary;
+--error ER_NO_SUCH_TABLE
+select 0 ++++++++++++++++++++++++++++++++++++++++++++++++1 from expect_binary;
+--error ER_NO_SUCH_TABLE
+select 0 ------------------------------------------------1 from expect_binary;
+
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (0, 0, 0);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (0, 0, -1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (0, 0, +1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (0, -1, 0);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (0, -1, -1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (0, -1, +1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (0, +1, 0);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (0, +1, -1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (0, +1, +1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (-1, 0, 0);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (-1, 0, -1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (-1, 0, +1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (-1, -1, 0);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (-1, -1, -1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (-1, -1, +1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (-1, +1, 0);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (-1, +1, -1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (-1, +1, +1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (+1, 0, 0);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (+1, 0, -1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (+1, 0, +1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (+1, -1, 0);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (+1, -1, -1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (+1, -1, +1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (+1, +1, 0);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (+1, +1, -1);
+--error ER_NO_SUCH_TABLE
+insert into expect_full_reduce values (+1, +1, +1);
+
+--error ER_NO_SUCH_TABLE
+select a-b, a+b, -a, -b, +a, +b from expect_unchanged;
+
+--enable_query_log
+
+SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR
+ FROM performance_schema.events_statements_summary_by_digest;
+