2012-08-14 17:23:34 +03:00
|
|
|
# ----------------------------------------------------
|
|
|
|
# Tests for the performance schema statement Digests.
|
|
|
|
# ----------------------------------------------------
|
|
|
|
|
|
|
|
# Test case to show behavior of statements digest in combination of different
|
|
|
|
# consumers enabled/disabled
|
|
|
|
|
|
|
|
--source include/not_embedded.inc
|
|
|
|
--source include/have_perfschema.inc
|
|
|
|
|
|
|
|
# Initial Setup for Digest
|
|
|
|
--source ../include/digest_setup.inc
|
|
|
|
|
|
|
|
# -----------------------------------------
|
|
|
|
# Consumer State |
|
|
|
|
# -----------------------------------------
|
|
|
|
# statements_digest Disabled |
|
|
|
|
# events_statement_current Enabled |
|
|
|
|
# -----------------------------------------
|
|
|
|
|
|
|
|
SELECT * FROM performance_schema.setup_consumers;
|
|
|
|
|
|
|
|
TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
|
|
|
|
|
|
|
|
# Executing queries
|
|
|
|
--source ../include/digest_execution.inc
|
|
|
|
|
|
|
|
--echo ####################################
|
|
|
|
--echo # QUERYING PS STATEMENT DIGEST
|
|
|
|
--echo ####################################
|
2014-10-07 11:37:36 +03:00
|
|
|
SELECT schema_name,digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
|
|
|
|
SELECT digest_text FROM performance_schema.events_statements_current;
|
2012-08-14 17:23:34 +03:00
|
|
|
|
|
|
|
# Cleanup for Digest
|
|
|
|
--source ../include/digest_cleanup.inc
|