← Back to team overview

maria-developers team mailing list archive

In daemon plugin, THD problem.


Hi, Sergei! 


I'm writing daemon plugin . I hava a problem and don't find soultion


There is my code as below.




pthread_handler_t monm_monitor(void *p)



     THD* thd;
      thd = new THD;
      thd->thread_stack= (char*) &thd;


     tables.init_one_table("performance_schema", 18,
"events_statements_current", 25, "events_statements_current", TL_READ);
     open_and_lock_tables(thd, &tables, FALSE,




static int monm_plugin_init(void *p __attribute__ ((unused))) 



 pthread_create(&mon_thread, &attr, monm_monitor,(void *) ctx)!= 0)




In monm_monitor function, 

THD* thd    cause server crash. so  I examined coredump. 

#6  0x0000000000598752 in THD::THD (this=0x7f9b64000930,
is_wsrep_applier=false) at


I don't know the reason of crash. 

What I just want to is read events_statements_current's row by using
internal interface in a daemon plugin. 

Is there a another way ? 

let me know the solution.












  김경남 부책임연구원
   솔루션사업본부 정보기술 연구원 
    02-2099-6177 / 010-2208-3006



상기 메시지와 첨부화일 내에는 비밀정보가 포함되어 있을 수 있으며, 지정된 수신자에 한하여 조회 및 사용될 수 있습니다. 만약
송신자의 실수로 인하여 상기 메시지를 수신하였다면, 송신자에게 메시지를 반송해 주시고, 원본 메시지와 모든 사본을 폐기해 주시기
상기 메시지의 전체 또는 일부에 대해 무단 열람, 사용, 공개, 배포하는 것은 금지되어 있습니다.(주)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