Bug 1171767 - TokuDB plugin missing from MariaDB
Summary: TokuDB plugin missing from MariaDB
Alias: None
Product: Fedora
Classification: Fedora
Component: mariadb
Version: 21
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Matej Mužila
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-12-08 14:45 UTC by Peter Laursen
Modified: 2015-05-25 01:48 UTC (History)
5 users (show)

Fixed In Version: mariadb-10.0.17-1.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-04-10 07:30:16 UTC
Type: Bug

Attachments (Terms of Use)

Description Peter Laursen 2014-12-08 14:45:14 UTC
Fedora 21 Desktop.  I have installed MariaDB (10.0.14) with yum from Fedoara repositories. It runs fine - but the TokuDB storage engine is not available

cd /usr/lib64/mysql/plugin
[root@localhost plugin]# ls
adt_null.so          ha_innodb.so              mysql_clear_password.so
auth_0x0100.so       handlersocket.so          qa_auth_client.so
auth_pam.so          ha_sequence.so            qa_auth_interface.so
auth_socket.so       ha_sphinx.so              qa_auth_server.so
auth_test_plugin.so  ha_spider.so              query_cache_info.so
daemon_example.ini   ha_test_sql_discovery.so  query_response_time.so
dialog_examples.so   libdaemon_example.so      semisync_master.so
dialog.so            locales.so                semisync_slave.so
ha_connect.so        metadata_lock_info.so     server_audit.so
ha_example.so        mypluglib.so              sql_errlog.so
[root@localhost plugin]# 

.. no ha_tokudb.so file there

Also after adding the line "INSTALL SONAME 'ha_tokudb'" to  /etc/my.cnf.d/server.cnf, the server will not start.

I think you simply overlooked the "-with_tokudb" configure option when building being not aware of this rather new opton? TokuDB is really an exitng and important storage engine in recent MariaDB servers  and should be available. If I am right please provide an upgrade to 10.0.15 soon with the TokuDB storage engine available.

Comment 1 Fedora Update System 2015-02-25 12:26:02 UTC
mariadb-10.0.16-4.fc21 has been submitted as an update for Fedora 21.

Comment 2 Fedora Update System 2015-02-26 05:55:57 UTC
Package mariadb-10.0.16-4.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mariadb-10.0.16-4.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 3 Peter Laursen 2015-02-28 11:41:48 UTC
Being the original reporter here, I was asked to confirm the fix in MariaDB 10.0.16. I can see the plugin .so in /plugindir now, but I cannot enable the plugin. In a MySQL client 

INSTALL PLUGIN tokudb SONAME 'ha_tokudb.so';
Error CODE: 1123
Can't initialize function 'tokudb'; Plugin initialization function failed.

I think it may be related to "transparent hugepages" being enabled as default in Fedora(?). It is a documented limitation with TokuDB that it will not work with "transparent hugepages".

On OpenSuSE 12.3 (what [also] has "transparent hugepages" being enabled as default) I could:

[peter@localhost ~]$ su
[root@localhost peter]# echo never > /sys/kernel/mm/transparent_hugepage/enabled
[root@localhost peter]# echo never > /sys/kernel/mm/transparent_hugepage/defrag 
.. what will/should disable hugepages and LOAD PLUGIN is successfull on SuSE (with packages from MariaDB's own repository for SuSE 13.x - not SuSE's - BTW)

The commands above return no error on Fedora 21, but I still cannot enable the TokuDB plugin.  I don't claim it is an issue/a bug. It could be a problem with my knowledge about Fedora and how to manage it.

Comment 4 Peter Laursen 2015-02-28 11:45:42 UTC

I was asked to confirm the fix in MariaDB 10.0.16
I was asked to confirm the fix in MariaDB 10.0.16 from Fedora project, currently in updates-testing repo.

Comment 5 Fedora Update System 2015-03-06 08:05:23 UTC
mariadb-10.0.17-1.fc21 has been submitted as an update for Fedora 21.

Comment 6 Hector Zhao 2015-03-25 08:06:38 UTC
I got this error in /var/log/mariadb/mariadb.log:

150325 15:06:46 [ERROR] TokuDB is not initialized because jemalloc is not loaded
150325 15:06:46 [ERROR] Plugin 'TokuDB' init function returned error.
150325 15:06:46 [ERROR] Plugin 'TokuDB' registration as a STORAGE ENGINE failed.

And it seems jemalloc is disabled in http://pkgs.fedoraproject.org/cgit/mariadb.git/commit/mariadb.spec?id=5df5e512

Comment 7 Fedora Update System 2015-04-10 07:30:16 UTC
mariadb-10.0.17-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Hector Zhao 2015-05-25 01:48:17 UTC
(In reply to Hector Zhao from comment #6)
> I got this error in /var/log/mariadb/mariadb.log:
> 150325 15:06:46 [ERROR] TokuDB is not initialized because jemalloc is not
> loaded

I managed to work around this by adding

> [mysqld_safe]
> malloc-lib=/usr/lib64/libjemalloc.so.1

to my.cnf and install a customized selinux policy

> module mariadb_jemalloc 1.0;
> require {
>         type mysqld_safe_t;
>         type mysqld_t;
>         class process noatsecure;
> }
> #============= mysqld_safe_t ==============
> allow mysqld_safe_t mysqld_t:process noatsecure;

as discussed in http://william.shallum.net/random-notes/selinux-and-ld-preload-or-testing-tokudb-on-percona-server

Note You need to log in before you can comment on or make changes to this bug.