| 1 |
# ----------------------------------------------------------------------- |
| 2 |
# Tests for the performance schema statement Digests. |
| 3 |
# ----------------------------------------------------------------------- |
| 4 |
|
| 5 |
# Test requires: sp-protocol/ps-protocol/view-protocol/cursor-protocol disabled |
| 6 |
--source include/no_protocol.inc |
| 7 |
# Thread stack overrun on solaris |
| 8 |
#--source include/not_sparc.inc |
| 9 |
# Include code directly here so test can avoid --no-skip |
| 10 |
let $have_solaris = `select convert(@@version_compile_os using latin1) LIKE ("solaris%")`; |
| 11 |
if ($have_solaris) |
| 12 |
{ |
| 13 |
skip Test requires: 'not_solaris'; |
| 14 |
} |
| 15 |
|
| 16 |
USE performance_schema; |
| 17 |
truncate table events_statements_summary_by_digest; |
| 18 |
|
| 19 |
# ----------------------------------------------------------------------- |
| 20 |
# Test to show how the digest behaves with long queries, when the token |
| 21 |
# stream is truncated. digest text is calculated based on value of |
| 22 |
# performance_schema_max_digest_length. |
| 23 |
# NOTE: For this test case to run, we need to start mysql server |
| 24 |
# with bigger stack using "--thread_stack=#" option. |
| 25 |
# ----------------------------------------------------------------------- |
| 26 |
SELECT |
| 27 |
1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 28 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 29 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 30 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 31 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 32 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 33 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 34 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 35 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 36 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 37 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 38 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 39 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 40 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 |
| 41 |
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1; |
| 42 |
|
| 43 |
--echo #################################### |
| 44 |
--echo # QUERYING PS STATEMENT DIGEST |
| 45 |
--echo #################################### |
| 46 |
SELECT schema_name, digest, digest_text, count_star FROM events_statements_summary_by_digest; |