Debian Codegraph @

mysql-test/suite/sysschema/t/fn_ps_is_thread_instrumented.test

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