| 1 |
# ---------------------------------------------------- |
| 2 |
# Tests for the performance schema statement Digests. |
| 3 |
# ---------------------------------------------------- |
| 4 |
|
| 5 |
# Test case to show behavior of statements digest in combination of different |
| 6 |
# consumers enabled/disabled |
| 7 |
|
| 8 |
# Initial Setup for Digest |
| 9 |
--source ../include/digest_setup.inc |
| 10 |
|
| 11 |
# ----------------------------------------- |
| 12 |
# Consumer State | |
| 13 |
# ----------------------------------------- |
| 14 |
# statements_digest Disabled | |
| 15 |
# events_statement_current Enabled | |
| 16 |
# ----------------------------------------- |
| 17 |
|
| 18 |
SELECT * FROM performance_schema.setup_consumers; |
| 19 |
|
| 20 |
TRUNCATE TABLE performance_schema.events_statements_summary_by_digest; |
| 21 |
|
| 22 |
# Executing queries |
| 23 |
--source ../include/digest_execution.inc |
| 24 |
|
| 25 |
--echo #################################### |
| 26 |
--echo # QUERYING PS STATEMENT DIGEST |
| 27 |
--echo #################################### |
| 28 |
SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest WHERE schema_name IS NOT NULL; |
| 29 |
SELECT digest, digest_text FROM performance_schema.events_statements_current; |
| 30 |
|
| 31 |
# Cleanup for Digest |
| 32 |
--source ../include/digest_cleanup.inc |