Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

THD::scramble access from a plugin?

1 view
Skip to first unread message

Felipe Gasper

unread,
Apr 30, 2015, 3:36:34 AM4/30/15
to
Hello,

Hopefully this isn’t too far off-topic for this forum, but I’m trying
to get access to THD::scramble from a plugin. How readily doable is this?

I see a reference to thd_get_current_thd() in mysql/thread_pool_priv.h,
but it wants a bunch of stuff (e.g., scheduler.h) that doesn’t seem to
be part of the installed development headers.

Thanks in advance for any consideration!

-Felipe Gasper
Houston, TX

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals

Tor Didriksen

unread,
Apr 30, 2015, 4:01:00 AM4/30/15
to
On 2015-04-30 09:29, Felipe Gasper wrote:
> Hello,
>
> Hopefully this isn’t too far off-topic for this forum, but I’m
> trying to get access to THD::scramble from a plugin. How readily
> doable is this?
>
> I see a reference to thd_get_current_thd() in
> mysql/thread_pool_priv.h, but it wants a bunch of stuff (e.g.,
> scheduler.h) that doesn’t seem to be part of the installed development
> headers.
>
> Thanks in advance for any consideration!
>
> -Felipe Gasper
> Houston, TX
>

Hello Felipe

Accessing current_thd->scramble would be very fragile.
You would need to build your plugin together with the server (from source)
because object layout in memory may change.

We have getters/setters for misc thd properties, some declared in
thread_pool_priv.h
others declared in service_thd_alloc.h

Alas, there is nothing to access THD::scramble.
Making one would be trivial though.

-- didrik
0 new messages