Integer overflow in MySQL process ID

[expired user #8929]'s profile image [expired user #8929] posted 9 years ago in General Permalink
I've got a nuisance situation where I can't abort long queries because the thread-id on my MySQL server is over 2Billion (2472375087 to be precsise) and it looks like HeidiSQL is storing the thread id to be use by the "stop" button in a 32-bit signed integer (/* Connected. Thread-ID: -1822592209 */).
i'm wouldn't be surprised if I'm the first one to hit this, since this server is reporting 463 days of uptime and has several "enterprise" workloads running on it.
Trivial bug.
Code modification/commit from ansgarbecker, 9 years ago, revision 9.2.0.4950
Change data type of connection thread id from int to int64, to support killing processes on long running servers. See http://www.heidisql.com/forum.php?t=18426
ansgar's profile image ansgar posted 9 years ago Permalink
Fixed in r4950.

Even the API method mysql_thread_id() does not support such high thread ids. So HeidiSQL does not use that any longer. Instead, this query is fired to get it:
SELECT CONNECTION_ID()
[expired user #8929]'s profile image [expired user #8929] posted 9 years ago Permalink
awesome!

Please login to leave a reply, or register at first.