10.7 preview feature: Natural sort

Natural sort order is the ordering of strings in alphabetical order, while numbers are treated as numbers. This understanding of sorting is closer to human comprehension than to a machine. You can find an example of this feature in the Windows file manager. There the files are sorted in natural order. Try to create four folders “b1”, “a11”, “a2”, “a1”.

There are several programming languages which have natural sort. In PHP it is built-in function natsort, while as an third-party module in Python it is natsort, in Perl it is Sort::Naturally and in Matlab it is sort_nat.

Making MariaDB understand MySQL JSON

Good news for MySQL users wishing to upgrade to MariaDB: MariaDB 10.5.7 onwards understands formerly-incompatible MySQL JSON fields! This blog entry explains how to install and use them.

Introducing MYSQL_JSON plugin

Starting from MariaDB 10.5.7 (commit f6549e), it is possible to upgrade from MySQL 5.7 tables containing JSON by loading the MYSQL_JSON data type plugin.

MariaDB and MySQL JSON formats are not the same. In MySQL, the JSON type is a native type, while in MariaDB JSON is just an alias for LONGTEXT. What this means in practice is that data in JSON format are not compatible with each other.