Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17237

thread IDs are printed in different formats in different sections of SHOW ENGINE INNODB STATUS output




      SHOW ENGINE INNODB STATUS uses different formats to print thread IDs in different sections of the output.

      For example, the thread IDs are in decimal in the SEMAPHORES section:

      OS WAIT ARRAY INFO: reservation count 518859705
      --Thread 140189784869632 has waited at lock0lock.cc line 5636 for 0.0000 seconds the semaphore:
      Mutex at 0x7f8859c88068 '&lock_sys->mutex', lock var 1
      Last time reserved by thread 139857189899008 in file not yet reserved line 0, waiters flag 0
      wait has ended

      We can see that this semaphore is held by a thread with ID 139857189899008. To find that thread in the TRANSACTIONS section, we have to convert it to hex. This value in hex is 7F330A1F8B00. This conversion allows us to find the relevant transaction:

      ---TRANSACTION 2284134567, ACTIVE 724 sec unlock_row
      mysql tables in use 2, locked 1
      2649 lock struct(s), heap size 407080, 1 row lock(s)
      MySQL thread id 207695, OS thread handle 0x7f330a1f8b00, query id 41767441 appuser Sending data
      UPDATE ...

      The main thread ID is also in decimal:

      Main thread process no. 13593, id 140188351182592, state: sleeping

      It might be worthwhile to change the output to be more consistent, so that users don't have to do decimal to hex conversions, and vice-versa. If not, then we should at least document this inconsistency.



        Issue Links



              vlad.lesin Vladislav Lesin
              GeoffMontee Geoff Montee (Inactive)
              3 Vote for this issue
              5 Start watching this issue



                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.