← Back to team overview

maria-developers team mailing list archive

[RE]Re: I wonder what elements add to CMakeLists.txt

 

Hi, Sergei !!

Thankyou for your response.

> I doubt it. The only reasonable way to get this is to query
performance
> schema. Either using SQL or with a lower-level handler interface. You
> can do either from your plugin.

Does a  lower-level handler interface means PSI? 

Is there a guide or document using PSI? It's a bit difficult to use PSI.

Regards,

kyungnam.

 

----------------------------Original Message----------------------------
From: Sergei Golubchik(serg@xxxxxxxxxxx)
To: 김경남/부책임연구원/신기술개발팀
Cc: community list[maria-developers@xxxxxxxxxxxxxxxxxxx]
Date: 2015.03.24 15:22 
Subject: Re: [Maria-developers] I wonder what elements add to
CMakeLists.txt 



Hi,  kyungnam!

On Mar 24,  kyungnam wrote:
> 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_parse.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.

Yes, that's better. There are many plugins that access THD,
even though THD is not officially a part of the plugin API.

> Otherwise, if i hardcode directly into the server, can I contribute
> this community ?

Sure. You can contribute anything. The question is whether community
will accept and use your contribution. I think the your contribution
will be used more if it won't require anyone to recompile the server.

> 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

Oh, my. These are stored in the internal perfschema data structures. I
don't think you can get them even from sql_parse.cc

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

I doubt it. The only reasonable way to get this is to query performance
schema. Either using SQL or with a lower-level handler interface. You
can do either from your plugin.

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

References