MariaDB 10.6 (and NextCloud): COMPRESSED Row is read-only by default

created
( modified )
@nabbisen

Series


I upgraded OpenBSD 6.9 to 7.0 yesterday. It brought MariaDB upgrade: 10.5 to 10.6. I checked my.cnf change and it seemed all right. Nevertheless, trouble was found on a NextCloud server using MariaDB on OpenBSD.

What happened was the failure of updating the package. I connected to the NextCloud server with web browser. There wasn’t the app dashboard, and the updater waited for being started instead. It meant pkg_add -u had failed to update NextCloud. Clicking the start button on the page ended up showing some exception had happened.

I read nextcloud.log in the server and got:

"level":3,
(...)
"Exception":"Doctrine\\DBAL\\Exception\\DriverException",
"Message":"An exception occurred while executing a query: 
SQLSTATE[HY000]: 
General error: 
4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.","Code":4047,

As to COMPRESSED row format, MariaDB is on the way to let it Read-Only by “removing write support and deprecating the feature”. They introduced innodb_read_only_compressed¶ option at 10.6.0 which was ON by default.

It was why updating NextCloud (from 21.0.4) to 21.0.5 on OpenBSD 7.0 failed. It was not because of OS or app version but the compatibility with MariaDB whose version is greater than or equal to 10.6.0. There is an open issue related to it in the NextCloud repo.

Well, I edited /etc/my.cnf temporarily to solve the problem:

  [mysqld]
  (...)
+ innodb_read_only_compressed = 0

Besides, I didn’t find how to set it on a specific database or a table and even the possibility😅

I restarted mysqld in the server, and tried the updater on the web page again. After all, it was totally successful.

I appreciated the MariaDB documentation and several posts such as GitHub issues and blogs. They helped me a lot.

Series

MariaDB
  1. MariaDB 10.6 (and NextCloud): COMPRESSED Row is read-only by default
  2. MariaDB 10.9 on OpenBSD 7.3: Install

Comments or feedbacks are welcomed and appreciated.