On Apr 13, Matthew Boehm wrote:
> Hi Sergei,
> I would like to use fill_status() as it seems to fit my requirement
> best. My idea being I pass an empty table structure to fill_status()
> and let it fill in all the global status variables. Then return to my
> daemon function and simply iterate through the table for what I need.
> However, the prototype for fill_status() asks for THD and TABLE_LIST
> variables. Being a daemon plugin inside mysql, I'm not sure I have a
> thd I can access. I figured I would be able to say something like
> "self" to represent my own thread but I don't think that's the same
By "a daemon plugin inside mysql" you mean you run in a separate thread
that you started, I suppose.
Technically a daemon plugin does not necessarily have a separate thread,
and, on the other hand, a separate thread can be run by any plugin, not
Anyway, in your own thread you don't have a thd, that's right.
> I've looked through the code a bit for an instantiation example of THD
> and TABLE_LIST but to no avail.
> Where should I look for this? Or do you have an example of instancing
See an example in the plugin/feedback/sender_thread.cc, in the