Alternatively, you can try to link your plugin explicitly with libmyisam.a
Won't this create two copies of libmyisam.a in memory (each one working with it's own set of static variables), and there'll be a danger of calling functions from different libraries with the same set of dynamically allocated data? Pavel On Thu, Dec 5, 2013 at 10:06 AM, Sergei Golubchik <serg@mariadb.org> wrote:
Hi, AugustQ!
On Dec 05, AugustQ wrote:
just one question: I have a simple plugin (a minimal storage engine) that does not load. When I try to load it I get this error-message:
MariaDB [(none)]> install plugin dummy soname 'ha_dummy'; ERROR 1126 (HY000): Can't open shared library '/home/august/MariaDB/pgm/lib/plugin/ha_dummy.so' (errno: 2 undefined symbol: _ZN9ha_myisam5cloneEPKcP11st_mem_root)
Can you please give me a tip. Thanks.
Environment is MariaDB 10.0.4.
The same code works without any problems in MySQL (5.5.8 - just for a test).
This happens because in MariaDB statically linked plugins don't export all their symbols. This helps to avoid name clashes with dynamically loaded plugins (like, when InnoDB is loaded and XtraDB is compiled in). Unlike MySQL we have a lot more of community developed storage engines, and we have to take these issues seriously.
Because of that, the symbol _ZN9ha_myisam5cloneEPKcP11st_mem_root is local in MariaDB, and your plugin doesn't see it. In MySQL this symbol is global.
I'll see if I can remove this.
Alternatively, you can try to link your plugin explicitly with libmyisam.a
Regards, Sergei
_______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp