List:Internals« Previous MessageNext Message »
From:Davi Arnaut Date:July 9 2011 2:26pm
Subject:Re: "OS thread id" removed
View as plain text  
Hi Greg,

On 7/9/11 11:14 AM, ghazel@stripped wrote:
> On Sat, Jul 9, 2011 at 7:00 AM, Davi Arnaut <davi.arnaut@stripped> wrote:
>> Hi,
>>
>> On 7/6/11 1:50 PM, ghazel@stripped wrote:
>>> First off, where can I find a real commit message? Second, is there no
>>> way to get the OS thread id now? It was very handy when tying MySQL
>>> thread id to OS thread id for debugging with gdb.
>>
>> How did you tie the MySQL thread id to the OS thread id? InnoDB did not
>> actually provide the OS thread id, it provide the value of the thread
>> descriptor. It was handy for locating the THD object? What exactly did
>> it help with?
> 
> The "show engine innodb status" transaction output list(ed) both the
> "MySQL thread id" and the "OS thread id":
> ---TRANSACTION CF5F643A, ACTIVE 14 sec, process no 410, OS thread id 1493494080
> 2 lock struct(s), heap size 376, 1 row lock(s)
> MySQL thread id 928182, query id 43574254 localhost root User sleep
> select sleep(200)
> 
> When represented in hex, 1493494080 is 0x5904e940 which matches the
> identifier printed by gdb:
> 
> Thread 11 (Thread 0x5904e940 (LWP 1113)):

0x5904e940 is the thread handle (ie pthread_self()), while 1113 is the
actual thread id. So, basically, you just want to be able to identify
which particular actual thread was last associated with a query/trans?
Thread
"OS thread id" removedghazel6 Jul
  • Re: "OS thread id" removedKristian Nielsen6 Jul
    • Re: "OS thread id" removedSergei Golubchik6 Jul
  • Re: "OS thread id" removedDavi Arnaut9 Jul
    • Re: "OS thread id" removedghazel9 Jul
      • Re: "OS thread id" removedDavi Arnaut9 Jul
        • Re: "OS thread id" removedghazel9 Jul
          • Re: "OS thread id" removedDavi Arnaut9 Jul
            • Re: "OS thread id" removedghazel9 Jul
Re: "OS thread id" removedMARK CALLAGHAN6 Jul