forward declaration problem in plugin.h
Dears...
I'm new in developing mariadb plugin.
I hava a plan about developing special monotoring tool for maraidb and will contribute that code this community.
Simple POC is in progress. and I've a problem in my code.
I read the guide for developing mariadb plugin. I choose my plugin type as deamon type.
So I write the code which collecting THD 's data. (class THD) . I want to use collect perf data by direct memory access method not using sql. ( like gathering v$view data by attaching oracle shared memory not sql)
In my code, there are some errors while building as follows.
-------
mysource.cc : error: invalid use of incomplete type 'struct THD'
mysql/plugin.
-------
in mysource.cc
-------
...
THD* thd;
void functionA()
{
thd = ....
thd->query() // <- at this point , error occurred
}
-------
Because THD is forward declared in mysql/plugin.h, this errors occurred in my thought. right?
I think that THD's member variable or method is not allowed to access in case of forward declaration.
so I add #include "sql_class.h" in mysource.cc , but errors still exists.
I'm not good at reading mariadb's source code yet. please help me to solve this problem.
if you need addtional infomations, please let me know.
Thanks in advance.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- MariaDB Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Kim Kyungnam for more information if necessary.