Data types
MySQL to MariaDB data types
Every MySQL data type that MariaDB stores differently, what the converter writes for it, when, and the report line.
Each row is a type from MySQL that MariaDB stores differently: what the MariaDB script gets, why, and the line the report writes about it. The rows come from the converter's own rules, so this page matches what it does.
Convert in the browser: MySQL to MariaDB opens the converter set up for this pair. The MySQL to MariaDB migration guide covers dumping, loading and the rules for keys, indexes and names.
A report line is a fix when the converter changed something and lists it, or a problem when a value or object is worth a look.
Numbers
| In MySQL | In MariaDB | Why | Report line |
|---|---|---|---|
| UNSIGNED and ZEROFILL | kept | The same types. | None |
Booleans and bits
| In MySQL | In MariaDB | Why | Report line |
|---|---|---|---|
| TINYINT(1), BOOL | TINYINT(1) | The same type with the same values. | None |
Text
| In MySQL | In MariaDB | Why | Report line |
|---|---|---|---|
| NUL bytes in text | kept | The value is copied with the same escape the source used. | None |
| text that isn't valid in its character set | the bad bytes as the replacement character | The script is UTF-8; bytes that aren't would stop the load. | invalid_utf8_replaced (problem) |
Enums and sets
| In MySQL | In MariaDB | Why | Report line |
|---|---|---|---|
| ENUM and SET, the '' error value included | kept | The same types; the script loads without strict mode, so the error value loads as it is. | None |
Dates and times
| In MySQL | In MariaDB | Why | Report line |
|---|---|---|---|
| zero, partial or impossible dates (0000-00-00, 2024-02-30) | kept | The script loads with ALLOW_INVALID_DATES and without NO_ZERO_DATE, so MariaDB keeps the same values the source had. | None |
| TIME | TIME, durations included | The same type, with the same range. | None |
| TIMESTAMP | kept, loaded in the time zone the dump states | The script sets the same time zone the dump did, so every moment is the same. | None |
Binary
| In MySQL | In MariaDB | Why | Report line |
|---|---|---|---|
| BINARY, VARBINARY, BLOB | kept | Bytes stay bytes. | None |
JSON, spatial and other types
| In MySQL | In MariaDB | Why | Report line |
|---|---|---|---|
| JSON | JSON (LONGTEXT checked by MariaDB) | MariaDB reads the same JSON text. | None |
| GEOMETRY, POINT, POLYGON... | kept, with each value's SRID | The server's own geometry bytes are copied, SRID included. | None |
| INET4, INET6, UUID (MariaDB) | kept | MySQL has no such types; the text MariaDB writes for them is kept. | None |
| geometries in a dump without CREATE TABLE | GEOMETRY | MySQL's geometry format is recognised from the values. | None |
| types IntoSQL doesn't know | LONGBLOB | A blob holds any value's bytes; change the type after loading. | unknown_type (problem) |
| values that don't fit their column | NULL | A damaged or hand-written dump can hold values its column can't; they become NULL so the rest loads. | invalid_value_null (problem) |
| unreadable geometries | NULL | Bytes that aren't a geometry can't be stored as one. | bad_geometry (problem) |
| VECTOR(n) (MariaDB 11.7+) | json with the floats as an array | The script loads on MariaDB 10.11 and later, which have no vector type; a JSON array keeps every float, and VEC_FromText reads it back. | type_replaced (fix) |
Counters and identities
| In MySQL | In MariaDB | Why | Report line |
|---|---|---|---|
| AUTO_INCREMENT | AUTO_INCREMENT with the table's counter | The counter continues where the source left it, MyISAM's per-group counters included. | None |
| MyISAM AUTO_INCREMENT on the second column of a key, in a table that isn't MyISAM in the dump | an index on the column and one counter for the table | InnoDB counts a column only when it leads an index, and once for the whole table. | myisam_group_autoincrement (problem) |
Other pairs
- MySQL into PostgreSQL, MySQL, SQLite, SQL Server, Oracle
- Into MariaDB from MariaDB, PostgreSQL, SQL Server, SQLite, Oracle
- Every pair