Re: "OS thread id" removed

[email protected]
Newsgroups gmane.comp.db.mysql.devel
Message-ID <CAEcY0kLp3GLTU=PPezf9Ffpb8YH1nj9MW2=NB-bR7fnHGtkN-g@mail.gmail.com>
On Sat, Jul 9, 2011 at 7:44 AM, Davi Arnaut <[email protected]> wrote:
> On 7/9/11 11:27 AM, [email protected] wrote:
>> On Sat, Jul 9, 2011 at 7:26 AM, Davi Arnaut <[email protected]> wrote:
>>> On 7/9/11 11:14 AM, [email protected] wrote:
>>>> On Sat, Jul 9, 2011 at 7:00 AM, Davi Arnaut <[email protected]> wrote:
>>>>> On 7/6/11 1:50 PM, [email protected] 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?
>>
>> That's right.
>
> Does the attached patch fix it for you?
>

Yes, that works great! As you point out in the gdb output I could
probably make use of the thread id as opposed to the handle just as
easily if there is any reason to print that instead.

Thanks for your help!

-Greg

-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.