| 1 |
# ------------------------------------------------------- |
| 2 |
# Tests for the performance schema Error Instrumentation. |
| 3 |
# ------------------------------------------------------- |
| 4 |
|
| 5 |
# Test case to show behavior of error instrumentation when |
| 6 |
# performance_schema_error-size is 0 |
| 7 |
|
| 8 |
# Expect 0 for system variable digest |
| 9 |
SHOW GLOBAL VARIABLES LIKE "performance_schema_error_size"; |
| 10 |
|
| 11 |
TRUNCATE TABLE performance_schema.events_errors_summary_global_by_error; |
| 12 |
TRUNCATE TABLE performance_schema.events_errors_summary_by_thread_by_error; |
| 13 |
TRUNCATE TABLE performance_schema.events_errors_summary_by_user_by_error; |
| 14 |
TRUNCATE TABLE performance_schema.events_errors_summary_by_host_by_error; |
| 15 |
TRUNCATE TABLE performance_schema.events_errors_summary_by_account_by_error; |
| 16 |
|
| 17 |
# Executing queries |
| 18 |
--error ER_BAD_DB_ERROR |
| 19 |
USE no_db; |
| 20 |
|
| 21 |
--error ER_NO_SUCH_TABLE |
| 22 |
SELECT * FROM no_table; |
| 23 |
|
| 24 |
--echo #################################### |
| 25 |
--echo # Fetching Errors' Stastics |
| 26 |
--echo #################################### |
| 27 |
SELECT * FROM performance_schema.events_errors_summary_global_by_error WHERE SUM_ERROR_HANDLED>0 OR SUM_ERROR_RAISED>0; |
| 28 |
SELECT * FROM performance_schema.events_errors_summary_by_thread_by_error WHERE SUM_ERROR_HANDLED>0 OR SUM_ERROR_RAISED>0; |
| 29 |
SELECT * FROM performance_schema.events_errors_summary_by_user_by_error WHERE SUM_ERROR_HANDLED>0 OR SUM_ERROR_RAISED>0; |
| 30 |
SELECT * FROM performance_schema.events_errors_summary_by_host_by_error WHERE SUM_ERROR_HANDLED>0 OR SUM_ERROR_RAISED>0; |
| 31 |
SELECT * FROM performance_schema.events_errors_summary_by_account_by_error WHERE SUM_ERROR_HANDLED>0 OR SUM_ERROR_RAISED>0; |