maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08357
Re: I wonder what elements add to CMakeLists.txt
Hi, kyung!
On Mar 23, kyung nam Kim wrote:
> 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.
Right. That's exactly why I ask.
We cannot accept your plugin and it'll be of little use to the community
(not "of no use", it'll be used, but less than it could've been) if one
would need to modify and recompile MariaDB to use your plugin.
If you'd like, let's try to figure out whether you can collect your
infomation without patching the server. So what data do you need,
exactly?
> 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);
Of course. Because you want sql_parse.cc to call your plugin, your
plugin *always must be in the server*. You cannot have it as a separate
shared object. To do that, add the MANDATORY keyword to your
MYSQL_ADD_PLUGIN() declaration in CMakeLists.txt
Regards,
Sergei
References