MySQL 5.1 federated engine fix
In 5.1.50 version of MySQL if you attempt to install the "federated" plugin you get this:
In the end I still abandoned the idea of splitting off a part of the database to a separate server using the federated engine. I could not make it use correct indexes and it kept trying to pull in huge datasets over the network, even if the query itself is very direct on a unique index.
This just looked like a neat trick, so here it goes. I could not google up any other easy solution at least.
Andrew.
mysql> install plugin federated soname 'ha_federated.so';Apparently dynstr_append_menu is not used anywhere else in mysqld. But it is defined in libmysqlclient. So, we can try to build a frankestein library like this:
ERROR 1126 (HY000): Can't open shared library '/usr/lib/mysql/plugin/ha_federated.so' (errno: 2 undefined symbol: dynstr_append_mem)
mysql>
levi plugin # cd /usr/lib/mysql/pluginNow trying to load the federated engine plugin:
levi plugin # gcc -shared -o ha_federated_am.so ha_federated.so ../libmysqlclient.so
mysql> install plugin federated soname 'ha_federated_am.so';It works.
Query OK, 0 rows affected, 1 warning (0.00 sec)
In the end I still abandoned the idea of splitting off a part of the database to a separate server using the federated engine. I could not make it use correct indexes and it kept trying to pull in huge datasets over the network, even if the query itself is very direct on a unique index.
This just looked like a neat trick, so here it goes. I could not google up any other easy solution at least.
Andrew.
4 Comments:
instead of your gcc... works for me the following linker command:
ld -shared -o ha_federated_am.so ha_federated.so ../libmysqlclient.so.16 --rpath=/usr/lib/mysql/plugin
the --rpath argument is important. before that the system cannot find one of the dependencies
thanks :]
I think you may want to get a facebook button to your website. I just marked down this site, although I must complete it manually. Just my advice.
Thank goodness I stumbled across this site. I too was able to get my FC12/5.1.45 version of MySQL to work w/ FEDERATED engine by using the comment provided by paranoiq - I just changed mine to reference the lib64 plugin folder and it worked perfectly!
This is the right fix:
Just recompile and configure with --with-plugin-federated
Federated as a loadable plugin is not there yet.
Fif.
Post a Comment
<< Home