All pages
Powered by GitBook
1 of 1

Loading...

mysql_thread_id

Syntax

  • mysql - a mysql handle, which was previously allocated by mysql_init() or mysql_real_connect().

Description

The mysql_thread_id() function returns the thread id for the current connection.

The current connection can be killed with . If reconnect option is enabled the thread id might change if the client reconnects to the server.

Note that connector will return only the first 32connectionsbits value. If your database might expect to create more than 4.3 billion connections without a restart, it's better to query 'select CONNECTION_ID()'

See also

unsigned long mysql_thread_id(MYSQL * mysql);
mysql_kill()
mysql_kill()
mysql_options()