In MySQL, the sys.ps_thread_account()
function returns the account associated with a given thread ID. It returns the account in the form user_name@host_name
.
Tag: functions
Understanding the sys.ps_is_instrument_default_enabled() Function in MySQL
In MySQL, we can use the sys.ps_is_instrument_default_enabled()
function to check whether a given Performance Schema instrument is enabled by default.
The function returns YES
or NO
, depending on whether the instrument is enabled by default.
Understanding the sys.ps_is_instrument_default_timed() Function in MySQL
In MySQL, we can use the sys.ps_is_instrument_default_timed()
function to check whether a given Performance Schema instrument is timed by default.
The function returns YES
or NO
, depending on whether the instrument is timed by default.
Understanding the sys.ps_is_thread_instrumented() Function in MySQL
In MySQL, we can use the sys.ps_is_thread_instrumented()
function to check whether Performance Schema instrumentation for a given connection ID is enabled.
The function returns YES
or NO
, depending on whether the instrumentation is enabled for the given connection. It can also return UNKNOWN
if the connection ID is unknown, and NULL
if the connection ID is NULL
.
Understanding the sys.version_patch() Function in MySQL
In MySQL, we can use the sys.version_patch()
function to return the patch release version of the MySQL server.
For example, if we’re using MySQL 8.0.33, sys.version_patch()
returns 33
.
Understanding the sys.version_minor() Function in MySQL
In MySQL, we can use the sys.version_minor()
function to return the minor release version of the MySQL server.
Understanding the sys.version_major() Function in MySQL
In MySQL, we can use the sys.version_major()
function to return the major release version of the MySQL server.
Understanding the PS_CURRENT_THREAD_ID() Function in MySQL
In MySQL, we can use the PS_CURRENT_THREAD_ID()
function to get the Performance Schema thread ID assigned to the current connection.
The PS_CURRENT_THREAD_ID()
function was added in MySQL 8.0.16, and it does the same thing as PS_THREAD_ID(CONNECTION_ID())
.
Understanding the FORMAT_PICO_TIME() Function in MySQL
In MySQL, format_pico_time()
is a Performance Schema function that converts a numeric Performance Schema latency or wait time in picoseconds into a human-readable format. It returns a string consisting of a value and a units indicator.
MySQL DEFAULT() Function Explained
In MySQL, the DEFAULT()
function returns the default value for a given column in the database.
If the column doesn’t have a default value, an error is returned.
Continue reading