# 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](/docs/server/server-usage/storage-engines/myrocks.md) 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](/docs/server/reference/product-development/plugin-development/storage-engines-storage-engine-development/engine-defined-new-tablefieldindex-attributes.md). 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](/docs/release-notes/community-server/old-releases/5.5/changes-improvements-in-mariadb-5-5.md)

* No online [ALTER TABLE](/docs/server/reference/sql-statements/data-definition/alter/alter-table.md).
  * All alter table that changes data or indexes requires a table copy.
* No online [OPTIMIZE TABLE](/docs/server/ha-and-performance/optimization-and-tuning/optimizing-tables/optimize-table.md).
* 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](/docs/server/server-usage/storage-engines/legacy-storage-engines/tokudb/tokudb-system-variables.md#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](/docs/release-notes/community-server/old-releases/10.0/changes-improvements-in-mariadb-10-0.md)

[MariaDB 10.0](/docs/release-notes/community-server/old-releases/10.0/changes-improvements-in-mariadb-10-0.md) (starting from 10.0.5) has online [ALTER TABLE](/docs/server/reference/sql-statements/data-definition/alter/alter-table.md). 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](/docs/server/ha-and-performance/optimization-and-tuning/optimizing-tables/optimize-table.md) before [10.0.11](/docs/release-notes/community-server/old-releases/10.0/10.0.11.md) (r4199)
* No gdb stack trace on sigsegv
* Before 10.0.10 the compression type did not default to the [tokudb\_row\_format](/docs/server/server-usage/storage-engines/legacy-storage-engines/tokudb/tokudb-system-variables.md#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](/docs/server/server-usage/storage-engines/legacy-storage-engines/tokudb.md) page.

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

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/server-usage/storage-engines/legacy-storage-engines/tokudb/tokudb-differences.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
