| 1 |
#------------------------------------------------------------- |
| 2 |
# Tests for PERFORMANCE_SCHEMA stored programs instrumentation |
| 3 |
#------------------------------------------------------------- |
| 4 |
|
| 5 |
# |
| 6 |
# Test case to show the behaviour of stored program instrumentation |
| 7 |
# when values of the system variables performance_schema_max_program_instances & |
| 8 |
# performance_schema_max_statement_stack are zero. |
| 9 |
# PS table will return empty set |
| 10 |
# |
| 11 |
|
| 12 |
--source ../include/start_server_common.inc |
| 13 |
|
| 14 |
# Values of variables server variables |
| 15 |
show global variables like "performance_schema_max_program_instances"; |
| 16 |
show global variables like "performance_schema_max_statement_stack"; |
| 17 |
|
| 18 |
--echo ##################### |
| 19 |
--echo # Setup |
| 20 |
--echo ##################### |
| 21 |
--source suite/perfschema/include/program_nested_setup.inc |
| 22 |
|
| 23 |
# Truncate summary table |
| 24 |
TRUNCATE performance_schema.events_statements_summary_by_program; |
| 25 |
|
| 26 |
--echo ##################### |
| 27 |
--echo # Executing Queries |
| 28 |
--echo ##################### |
| 29 |
--source suite/perfschema/include/program_nested_execution.inc |
| 30 |
|
| 31 |
--echo ########################################### |
| 32 |
--echo # Quering PS statement summary table # |
| 33 |
--echo ########################################### |
| 34 |
|
| 35 |
SELECT OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA |
| 36 |
FROM performance_schema.events_statements_summary_by_program; |
| 37 |
|
| 38 |
SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_program; |
| 39 |
|
| 40 |
--echo ##################### |
| 41 |
--echo # Cleanup |
| 42 |
--echo ##################### |
| 43 |
--source suite/perfschema/include/program_nested_cleanup.inc |
| 44 |
|
| 45 |
|