> Does that mean you didn't use THD before 5.04?
Mroonga used THD before 5.04.
The test failure reported in this issue is caused by "unresolved symbol" load error on dlopen() in sql/sql_plugin.cc.
The symbol was referenced from unused code for MariaDB 10.1 build. It was fixed by disabling the code at https://github.com/mroonga/mroonga/commit/2894292fd908b1bbe59d829e7fdab89e6d751d4d#diff-ba714ec217aa6836e39b3aea9da57ae2R16267
(Sorry. I forgot the "unresolved symbol" name.)
> So, for now I'll add RECOMPILE_FOR_EMBEDDED for mroonga and I'll enable embedded tests for mroonga but only when mroonga is built in statically.
Unfortunately, it doesn't solve anything. Because Mroonga passes MODULE_ONLY flag to mysql_add_plugin():
https://github.com/MariaDB/server/blob/10.1/storage/mroonga/CMakeLists.txt#L323
RECOMPILE_FOR_EMBEDDED doesn't work for MODULE_ONLY plugin:
https://github.com/MariaDB/server/blob/10.1/cmake/plugin.cmake#L122
> If you'd like to consider removing dependency on THD, I'd be happy to help with that too. Please, tell me what you use THD for and I'll see what we can do about it.
We want to implement "abort on warning" feature in Mroonga. If we can implement the feature without THD, we don't use THD for the feature.
EMBEDDED_LIBRARY macro affects THD::abort_on_warning position in THD.
I've fixed it on master in the Mroonga repository: https://github.com/mroonga/mroonga
I've added "MRN_BUILD_FOR_EMBEDDED_SERVER" CMake option. We need to enable the value by passing "-DMRN_BUILD_FOR_EMBEDDED_SERVER=ON" when we build Mroonga for embedded server.
Reason: Mroonga uses "THD". "THD" has more fields when it's build for embedded server. (See "#ifdef EMBEDDED_LIBRARY" in sql/sql_class.h.) We need to build Mroonga with "EMBEDDED_LIBRARY" flag for embedded server. The "MRN_BUILD_FOR_EMBEDDED_SERVER" CMake option adds "-DEMBEDDED_LIBRARY" compiler (preprocessor) flag.