Syntax:
CONNECTION_ID()

Returns the connection ID (thread ID) for the connection. Every
connection has an ID that is unique among the set of currently
connected clients.

URL: http://dev.mysql.com/doc/refman/5.0/en/information-functions.html

