maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08358
Re: I wonder what elements add to CMakeLists.txt
-
To:
sergei <serg@xxxxxxxxxxx>
-
From:
김경남 <knamkim@xxxxxxxxx>
-
Date:
Tue, 24 Mar 2015 13:25:01 +0900
-
Bcc:
-
Cc:
community list <maria-developers@xxxxxxxxxxxxxxxxxxx>
-
Comment:
DNMAIL-Y-0-N-0-N
-
Importance:
normal
-
Priority:
normal
-
Thread-index:
AdBl2/Er03OLL9JfSDKihZPg1rksHw==
-
Thread-topic:
Re: [Maria-developers] I wonder what elements add to CMakeLists.txt
Hi, Sergei!
Thanks for your advice and I agree with you.
Accoring to your advice, It's not a good plan to pass some data to my
plugin agent from sql_parser.cc because it needs to compile mariadb
server.
So I hava a another concept.
Instead of put some code to sql_parse.cc, plugin collects a some data
like below sample conceptual code.
I_List_iterator<THD> it(threads);
while ((tmp_thd=it++))
{
if ((tmp_thd->get_command() == COM_QUERY)
||(tmp_thd->get_command() == COM_STMT_EXECUTE) )
continue;
char* sql = tmp_thd->query();
if(sql)
{
...
send_data();
}
}
In this case, I though that it doesn't need to compile maria server,
but it need to recompile whenever structure of THD is changed.
Can you accept that?
Otherwise, if i hardcode directly into the server, can I contribute
this community ?
Additionally, you asked me about what information I want to collect.
I want to collect data like below.
* events_statements_current
* events_stages_current
* events_waits_current
* events_statements_summary_by_digest
These data easily collected by sql . but it's hard to collect by access
memory.(THD or something else.)
I wonder if it is possible to collect these data without using pfs (or
psi) data structure.
If it is possible, Is THD class is entry point or something else?
If you don't mind, please let me know the best way to collect these
data.
Dear,
kyungnam.
ps: my email address changed from gmail to my company's mail address.
------------------------------------------------------------------------
----
From: Sergei Golubchik <serg@xxxxxxxxxxx>
Date: 2015-03-24 0:11 GMT+09:00
Subject: Re: [Maria-developers] I wonder what elements add to
CMakeLists.txt
To: kyung nam Kim <knamkim@xxxxxxxxx>
Cc: maria-developers@xxxxxxxxxxxxxxxxxxx
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
_____
상기 메시지와 첨부화일 내에는 비밀정보가 포함되어 있을 수 있으며, 지정된 수신자에 한하여 조회 및 사용될 수 있습니다. 만약
송신자의 실수로 인하여 상기 메시지를 수신하였다면, 송신자에게 메시지를 반송해 주시고, 원본 메시지와 모든 사본을 폐기해 주시기
바랍니다.
상기 메시지의 전체 또는 일부에 대해 무단 열람, 사용, 공개, 배포하는 것은 금지되어 있습니다.(주)LG CNS.
This message and its attachments may contain confidential information,
and they are intended to be viewed or used by only the individuals
specified in the message. If you have received this message in an error
from the sender, please contact the sender immediately to notify the
error and delete all of the message and its copies. It is prohibited to
view, use, make public and/or distribute part or whole of this message
without written permission.
Follow ups