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.