Bug #69437 inconsistent decimal/hex outputs of thread in innodb status
Submitted: 10 Jun 2013 16:30 Modified: 12 Jul 2013 12:08
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version:5.7.2 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[10 Jun 2013 16:30] Shane Bester
Description:
Example output, we see "thread id 2176" has reserved a semaphore.
But in the transactions list, it is referred to as "thread handle 0x880"

----------
OS WAIT ARRAY INFO: reservation count 35
--Thread 6564 has waited at btr0cur.cc line 883 for 54.00 seconds the semaphore:
S-lock on RW-latch at 000000006666B810 created in file dict0dict.cc line 2446
a writer (thread id 2176) has reserved it in mode  exclusive
number of readers 0, waiters flag 1, lock_word: fff00000
Last time read locked in file not yet reserved line 0
Last time write locked in file btr\btr0btr.cc line 4553
OS WAIT ARRAY INFO: signal count 99
Mutex spin waits 12608, rounds 2507, OS waits 18
RW-shared spins 142, rounds 631, OS waits 15
RW-excl spins 1, rounds 61, OS waits 1
Spin rounds per wait: 0.20 mutex, 4.44 RW-shared, 61.00 RW-excl
------------
TRANSACTIONS
------------
Trx id counter 4169
Purge done for trx's n:o < 4165 undo n:o < 0 state: running but idle
History list length 295
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 4, OS thread handle 0x153c, query id 23 127.0.0.1 ODBC init
show engine innodb status
---TRANSACTION 0, not started checking table
mysql tables in use 1, locked 1
MySQL thread id 1, OS thread handle 0x880, query id 3 127.0.0.1 ODBC System lock
check table t1
---TRANSACTION 0, ACTIVE 54 sec starting index read
mysql tables in use 2, locked 2
1 lock struct(s), heap size 384, 0 row lock(s)
MySQL thread id 3, OS thread handle 0x19a4, query id 19 127.0.0.1 ODBC Sending data
insert into t2(a) select a from t1 limit 10000000
-------

How to repeat:
show engine innodb status,  read code

Suggested fix:
make both hex or both decimal, but not one of each ;-0
[10 Jun 2013 16:35] Shane Bester
filed this as it dawned on me recently that not every mysql user knows what is hex  :)
[12 Jul 2013 12:08] Bugs System
Added a changelog entry for 5.7.2:

""SHOW ENGINE INNODB STATUS" output would reference a thread in hex format
(example: "thread handle 0x880") while the same thread would be referenced
in the "SHOW ENGINE INNODB STATUS" transaction list using a decimal format
(example: "thread id 2176")."