MariaDB 10.6 (and NextCloud): COMPRESSED Row is read-only by default
- Databases and storage
- Published
- 2 min read
- @nabbisen
I upgraded OpenBSD (opens in a new tab) 6.9 to 7.0 (opens in a new tab) yesterday.
It brought MariaDB (opens in a new tab) upgrade: 10.5 to 10.6.
I checked my.cnf change and it seemed all right.
Nevertheless, trouble was found on a NextCloud (opens in a new tab) 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 (opens in a new tab) by “removing write support and deprecating the feature”.
They introduced innodb_read_only_compressed¶ (opens in a new tab) option at 10.6.0 (opens in a new tab) 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 (opens in a new tab) in the NextCloud repo (opens in a new tab).
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 issue (opens in a new tab)s and blogs. They helped me a lot.
More on: Run a database on your server
-
OpenBSD gives us good documentation as a series of the project.
-
OpenBSD gives us good documentation as a series of the project.
-
OpenBSD gives us good documentation as a series of the project.
OBSD Solutions
OBSD Solutions: OpenBSD consulting and support by Scqr, Reflerd Inc. (opens in a new tab)
Comments and feedback are welcome.