Upgrade MariaDB to 4 byte support

Nextcloud version :17.0.2
Operating system and version : FN11.3 FreeBSD11.3
MariaDB version: Server version: 10.4.11-MariaDB FreeBSD Ports
The issue you are facing:
The system runs as expected, but the admin page writes this:
"MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. "

Is this the first time you’ve seen this error? (Y/N): No, I’t has been complaining about lack of emojis for more than a year.

I have been trying to use this guide to upgrade database:
https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/mysql_4byte_support.html#mariadb-support

I have created an my.conf file, and got rc.conf to add an reference to it when starting sql server
(I know that the file is loaded since the sql server fails load, if garbage is added to the file)
cat /usr/local/etc/my.cnf
[mysqld]
innodb_file_per_table=1

ps -aux
/usr/local/libexec/mysqld --defaults-extra-file=/usr/local/etc/my.cnf --basedir=/usr/local --datadir=/var/db/mysql --plugin-dir=/usr/local/lib/mysql/plugin --log-error=/var/db

SELECT NAME, SPACE, FILE_FORMAT FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME like "nextcloud%";
    ERROR 1054 (42S22): Unknown column 'FILE_FORMAT' in 'field list'


    SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES limit 20;
    +----------+-----------------------------------+------+--------+-------+------------+---------------+------------+
    | TABLE_ID | NAME                              | FLAG | N_COLS | SPACE | ROW_FORMAT | ZIP_PAGE_SIZE | SPACE_TYPE |
    +----------+-----------------------------------+------+--------+-------+------------+---------------+------------+
    |       14 | SYS_DATAFILES                     |    0 |      5 |     0 | Redundant  |             0 | System     |
    |       11 | SYS_FOREIGN                       |    0 |      7 |     0 | Redundant  |             0 | System     |
    |       12 | SYS_FOREIGN_COLS                  |    0 |      7 |     0 | Redundant  |             0 | System     |
    |       13 | SYS_TABLESPACES                   |    0 |      6 |     0 | Redundant  |             0 | System     |
    |       15 | SYS_VIRTUAL                       |    0 |      6 |     0 | Redundant  |             0 | System     |
    |       19 | mysql/gtid_slave_pos              |   33 |      7 |     4 | Dynamic    |             0 | Single     |
    |      115 | mysql/innodb_index_stats          |   33 |     11 |   100 | Dynamic    |             0 | Single     |
    |      116 | mysql/innodb_table_stats          |   33 |      9 |   101 | Dynamic    |             0 | Single     |
    |       22 | mysql/slave_master_info           |   33 |     26 |     7 | Dynamic    |             0 | Single     |
    |       23 | mysql/slave_relay_log_info        |   33 |     11 |     8 | Dynamic    |             0 | Single     |
    |       24 | mysql/slave_worker_info           |   33 |     15 |     9 | Dynamic    |             0 | Single     |
    |       18 | mysql/transaction_registry        |   33 |      8 |     3 | Dynamic    |             0 | Single     |
    |       25 | ownclouddb/oc_accounts            |   33 |      5 |    10 | Dynamic    |             0 | Single     |
    |      117 | ownclouddb/oc_activity            |   33 |     18 |   102 | Dynamic    |             0 | Single     |
    |      118 | ownclouddb/oc_activity_mq         |   33 |     13 |   103 | Dynamic    |             0 | Single     |
    |       28 | ownclouddb/oc_addressbookchanges  |   33 |      8 |    13 | Dynamic    |             0 | Single     |
    |       29 | ownclouddb/oc_addressbooks        |   33 |      9 |    14 | Dynamic    |             0 | Single     |
    |       30 | ownclouddb/oc_appconfig           |   33 |      6 |    15 | Dynamic    |             0 | Single     |
    |       31 | ownclouddb/oc_authtoken           |   33 |     19 |    16 | Dynamic    |             0 | Single     |
    |       32 | ownclouddb/oc_bruteforce_attempts |   33 |      9 |    17 | Dynamic    |             0 | Single     |
    +----------+-----------------------------------+------+--------+-------+------------+---------------+------------+



select version();
+-----------------+
| version()       |
+-----------------+
| 10.4.11-MariaDB |
+-----------------+

I seems like the DB field did not exist prior to MariaDB version 10:


I seems like a database created before version 10 does not get those fields when binary is upgraded???
I have done a mariadb-upgrade this did not change anything.

Others have seen the same issue, but I don’t know if their problem have been solved…

Question: Miising FILE_FORMAT column in INNODB_SYS_TABLES
Title: Re: Missing FILE_FORMAT column in INNODB_SYS_TABLES
User: Marko Mäkelä

INFORMATION_SCHEMA.INNODB_SYS_TABLES is a hard-coded view that is provided to the InnoDB internal data dictionary table SYS_TABLES that resides in the system tablespace. The column FILE_FORMAT does not have any direct counterpart in SYS_TABLES.
The configuration parameters innodb_file_format and innodb_large_prefix were deprecated in MariaDB 10.2.2 when the InnoDB changes from MySQL 5.7.9 were merged. The motivation for the deprecation and removal was that originally these parameters were introduced to supposedly allow downgrading to older versions than MySQL 5.5. To make matters worse, the default values of these parameters caused the files to remain in the backward-compatible format. Only MySQL 5.7 and MariaDB 10.2 would change the defaults to sane values and deprecate these useless parameters. (The predecessors of MySQL 5.5 were already EOL at that point, and besides, we do not really support downgrades.)
Those 2 deprecated parameters were removed in MariaDB 10.3, but they were put back later in MDEV-18399, because the sane defaults were explicitly specified in commonly used configuration files.
I do not think that it makes sense to carry the column in INNODB_SYS_TABLES.
Note: In MariaDB 10.3 and MariaDB 10.4, InnoDB file formats were extended by MDEV-11369 and MDEV-15562. You can disable those format changes by
SET GLOBAL innodb_instant_alter_column_allowed=never;
which was implemented in MDEV-20590.