unsigned long mysql_thread_id(MYSQL *mysql)
20.4.49.1 Description
Returns the thread ID of the current connection. This value can be used as
an argument to mysql_kill()
to kill the thread.
If the connection is lost and you reconnect with mysql_ping()
, the
thread ID will change. This means you should not get the thread ID and store
it for later, you should get it when you need it.
20.4.49.2 Return values
The thread ID of the current connection.
20.4.49.3 Errors
None.