Hi, Sergei!
Thanks for your reply.
You asked me about information which I want to send to my plugin.
I have a plan to develop monitoring tool for mariadb.
I want to develop a agent as a mariadb plugin.
Agent collect data from sql_parse.cc (I' don't know exactly where more infomation about performance .) and sends that data to APM (Application Performance Monitoring) Server. and Users use databoard to see that data via APM server.
 
We  have already have a APM Server, Dashboard and many kinds of agent. (for server, was). I want to add agent for mariaDB and contribute this community if possible.
 
Your advice is right. It's easier my header file to sql folder. 
But When I want to develop my agent as a plugin type, I meet error as follows.
============================================
[ 98%] Built target mysqlserver
Linking CXX shared library libmysqld.so
../../sql_parse.cc:linenum: undefined reference to 'Mymon::Mymon()'
../../sql_parse.cc:linenum: undefined reference to 'Mymon::putData(THD* thd);
....
================================================================'
My source is like this.

sql_parse.cc
----------------------------
#include "../plugin/myplugin/plugin.h"
....
#ifdef MYMON
...
Mymon* mon = new Mymon();
mon->putData(thd);
...

CMakeList.txt
----------------------------------------

 SET (SQL_SOURCE
            .....
        myplugin.h    
        myplugin.cc
.....


In my thought, errors come from the link option . isn't right?

how do i fix this build error? 

Regards,
kyongnam.


 

 
2015-03-23 23:09 GMT+09:00 Sergei Golubchik <serg@mariadb.org>:
Hi, kyung!

On Mar 23, kyung nam Kim wrote:
> Hi, Sergei ! Thanks for your reply,
> The exact thing I want is invoke a method in my plugin from sql_parse.cc.
>
> ex)
>
> myplugin.h
> ----------------------------
> public:
>    void putData(...);
>
>
> sql_parse.cc
> -----------------------------
> ....
>
> myplugin->putData(...)
>
>
> how do i modify CMakeLists.txt?
>
> Thanks in advance.

In that case, as I said, it's not a plugin. You can simply put your
files in sql/ directory - it could be easier.

Otherwise... include your myplugin.h in sql_parse.cc and hopefully it'll
work.

> I want pass some information from sql_parse.cc to methodA in my plugin.

What kind of information?

Regards,
Sergei