All pages
Powered by GitBook
1 of 1

Loading...

ps_is_thread_instrumented

The ps_is_thread_instrumented function checks whether a specific thread ID is currently instrumented by the Performance Schema.

Syntax

sys.ps_is_thread_instrumented(connection_id)

Description

ps_is_thread_instrumented is a available with the that returns whether or not Performance Schema instrumentation for the given connection_id is enabled.

  • YES - instrumentation is enabled

  • NO - instrumentation is not enabled

  • UNKNOWN - the connection ID is unknown

Examples

This page is licensed: CC BY-SA / Gnu FDL

NULL - NULL value
stored function
Sys Schema
SELECT sys.ps_is_thread_instrumented(CONNECTION_ID());
+------------------------------------------------+
| sys.ps_is_thread_instrumented(CONNECTION_ID()) |
+------------------------------------------------+
| YES                                            |
+------------------------------------------------+

SELECT sys.ps_is_thread_instrumented(2042);
+-------------------------------------+
| sys.ps_is_thread_instrumented(2042) |
+-------------------------------------+
| UNKNOWN                             |
+-------------------------------------+

SELECT sys.ps_is_thread_instrumented(NULL);
+-------------------------------------+
| sys.ps_is_thread_instrumented(NULL) |
+-------------------------------------+
| NULL                                |
+-------------------------------------+

Sys Schema is available from MariaDB 10.6.