# TokuDB Differences

{% hint style="warning" %}
TokuDB has been deprecated by its upstream maintainer. It is disabled from MariaDB 10.5 and has been removed in MariaDB 10.6 - [MDEV-19780](https://jira.mariadb.org/browse/MDEV-19780). We recommend [MyRocks](https://mariadb.com/docs/server/server-usage/storage-engines/myrocks) as a long-term migration path.
{% endhint %}

Because we, the MariaDB developers, don't want to add a lot of new features or big code changes to a stable release, not all TokuDB features are merged at once into MariaDB. Instead they are added in stages.

On this page we list all the known differences between the TokuDB from [Tokutek](https://www.tokutek.com) and the default MariaDB version from [MariaDB.org](https://downloads.mariadb.org):

## All MariaDB versions

* TokuDB is not the default storage engine.
  * If you want to enable this, you have to start mysqld with: `--default-storage-engine=tokudb`.
* Auto increment for second part of a key behaves as documented (and as it does in MyISAM and other storage engines).
* The DDL syntax is different. While binaries from Tokutek have the patched SQL parser, TokuDB in MariaDB uses the special [Storage Engine API extension](https://mariadb.com/docs/server/reference/product-development/plugin-development/storage-engines-storage-engine-development/engine-defined-new-tablefieldindex-attributes). Thus in Tokutek binaries you write `CLUSTERED KEY (columns)` and, for example, `ROW_FORMAT=TOKUDB_LZMA`. And in MariaDB you write `KEY (columns) CLUSTERING=YES` and `COMPRESSION=TOKUDB_LZMA`.

## Features missing in [MariaDB 5.5](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/5.5/changes-improvements-in-mariadb-5-5)

* No online [ALTER TABLE](https://mariadb.com/docs/server/reference/sql-statements/data-definition/alter/alter-table).
  * All alter table that changes data or indexes requires a table copy.
* No online [OPTIMIZE TABLE](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/optimizing-tables/optimize-table).
* No `INSERT NOAR` or `UPDATE NOAR` commands.
* No gdb stack trace on sigsegv
* IMPORTANT: the compression type does not default to the [tokudb\_row\_format](https://mariadb.com/docs/server/server-usage/storage-engines/legacy-storage-engines/tokudb-system-variables#tokudb_row_format) session variable as it does with Tokutek's builds. If `COMPRESSION=` is not included in `CREATE TABLE` or `ALTER TABLE ENGINE=TokuDB` then the TokuDB table are uncompressed (before 5.5.37) or zlib-compressed (5.5.37 and later).

## Features missing in [MariaDB 10.0](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/10.0/changes-improvements-in-mariadb-10-0)

[MariaDB 10.0](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/10.0/changes-improvements-in-mariadb-10-0) (starting from 10.0.5) has online [ALTER TABLE](https://mariadb.com/docs/server/reference/sql-statements/data-definition/alter/alter-table). So the features missing are:

* No `INSERT NOAR` or `UPDATE NOAR` commands.
  * We are working with Tokutek to improve this feature before adding it to MariaDB.
* No online [OPTIMIZE TABLE](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/optimizing-tables/optimize-table) before [10.0.11](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/10.0/10.0.11) (r4199)
* No gdb stack trace on sigsegv
* Before 10.0.10 the compression type did not default to the [tokudb\_row\_format](https://mariadb.com/docs/server/server-usage/storage-engines/legacy-storage-engines/tokudb-system-variables#tokudb_row_format) session variable. If `COMPRESSION=` was not included in `CREATE TABLE` or `ALTER TABLE ENGINE=TokuDB` then the TokuDB table was created uncompressed.

## Version of the TokuDB plugin included on MariaDB

This is found on the [TokuDB](https://mariadb.com/docs/server/server-usage/storage-engines/legacy-storage-engines/tokudb) page.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
