PS_CURRENT_THREAD_ID()

Returns a BIGINT UNSIGNED value representing the Performance Schema
thread ID assigned to the current connection.

The thread ID return value is a value of the type given in the
THREAD_ID column of Performance Schema tables.

Performance Schema configuration affects PS_CURRENT_THREAD_ID() the
same way as for PS_THREAD_ID(). For details, see the description of
that function.

URL: https://dev.mysql.com/doc/refman/8.4/en/performance-schema-functions.html

