
| [INTEG |                                              | 64bit unsigned    |
| R]     |                                              | integer)          |
+--------+----------------------------------------------+-------------------+

A Note About Lengths
--------------------

If you're running queries like

SELECT COLUMN_GET(blob, 'colname' as CHAR) ...

without specifying a maximum length (i.e. using #as CHAR#, not as CHAR(n)),
MariaDB will report the maximum length of the resultset column to be
53,6870,911 (bytes or characters?) for MariaDB 5.3-10.0.0 and 16,777,216 for
MariaDB 10.0.1+. This may cause excessive memory usage in some client
libraries, because they try to pre-allocate a buffer of maximum resultset
width. If you suspect you're hitting this problem, use CHAR(n) whenever you're
using COLUMN_GET in the select list.

MariaDB 5.3 vs MariaDB 10.0
---------------------------

The dynamic columns feature was introduced into MariaDB in two steps:

* MariaDB 5.3 was the first version to support dynamic columns. Only numbers
 could be used as column names in this version.
* In MariaDB 10.0.1, column names can be either numbers or strings.
 Also, the COLUMN_JSON and COLUMN_CHECK functions were added.

See also Dynamic Columns in MariaDB 10.

Client-side API
---------------

It is also possible to create or parse dynamic columns blobs on the client
side. libmysql client library now includes an API for writing/reading dynamic
column blobs. See dynamic-columns-api for details.

Limitations
-----------

+---------------------------------------------------+------------------------+
| Description                                       | Limit                  |
+---------------------------------------------------+------------------------+
| Max number of columns                             | 65535                  |
+---------------------------------------------------+------------------------+
| Max total length of packed dynamic column         | max_allowed_packet     |
|                                                   | (1G)                   |
+---------------------------------------------------+------------------------+

URL: https://mariadb.com/kb/en/dynamic-columns/