| 1 |
# Tests for sys schema |
| 2 |
# Verify the sys.ps_is_thread_instrumented() function perfoms as expected |
| 3 |
|
| 4 |
# Passing NULL/nothing should return NULL |
| 5 |
SELECT sys.ps_is_thread_instrumented(NULL); |
| 6 |
|
| 7 |
# By default current thread should be instrumented |
| 8 |
SELECT sys.ps_is_thread_instrumented(CONNECTION_ID()); |
| 9 |
|
| 10 |
# Now toggle our thread to off and re-check |
| 11 |
UPDATE performance_schema.threads SET instrumented = 'NO' WHERE processlist_id = CONNECTION_ID(); |
| 12 |
SELECT sys.ps_is_thread_instrumented(CONNECTION_ID()); |
| 13 |
|
| 14 |
# Try some huge number to check unknown connections |
| 15 |
SELECT sys.ps_is_thread_instrumented(234623462376); |
| 16 |
|
| 17 |
--source ../include/ps_threads_cleanup.inc |