List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:April 19 2011 10:34am
Subject:Re: accessing status variables
View as plain text  
Hi, Matthew!

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
> thing.

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
only daemons.

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
> each?

See an example in the plugin/feedback/sender_thread.cc, in the
https://code.launchpad.net/~maria-captains/maria/5.1-feedback tree.

Regards,
Sergei
Thread
accessing status variablesMatthew Boehm21 Feb
  • Re: accessing status variablesSergei Golubchik1 Mar
    • Re: accessing status variablesMatthew Boehm13 Apr
      • Re: accessing status variablesSergei Golubchik19 Apr