Nc 12.0.1 upgrade from 12.0.0 gives error 1296 Got error 64 'Temp file write failure'

I see the following message when I attempt the upgrade from either the occ script or the web:

sudo -u www-data php occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘ALTER TABLE oc_filecache ROW_FORMAT=COMPRESSED;’:

SQLSTATE[HY000]: General error: 1296 Got error 64 ‘Temp file write failure’ from InnoDB
Update failed
Maintenance mode is kept active
Reset log level

I’m using Debian Stretch on the Nextcloud server with Apache and php7 and I’m using Debian Stretch and mariadb on the database side.

The system works fine if I roll back to the prior 12.0.0 build.

I have already verified ownership of the nextcloud files, I have also tried restarting mariadb because I saw in a previous thread for a prior version of nextcloud that restarting the DB helps, but for me, it does not.

I have a suspicion that the tmp directory is running out of space while attempting to operate on the oc_filecache table, which is MASSIVE. I don’t have time to test my theory tonight, but I will try expanding the disk tomorrow and see where that gets me. Will post results.

For anyone reading this, it was as I suspected! I added about 5GB to my /tmp directory and was able to upgrade the database. I ran into another snag though with this error: General error: 1709 Index column size too large. The maximum column size is 767 bytes.

I was able to solve that by editing my /etc/mysql/conf.d/mysqld_collation.cnf file. I use mariadb so this should work with either mysql or maria.

The file looks like this:

character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
innodb_large_prefix = 1
innodb_file_per_table = 1
innodb_file_format = barracuda

These entries may also work in other mysql.cnf files in the conf.d directory or even in the main file in /etc/mysql/mariadb.cnf or mysql.cnf depending on what database you have.

Also I upgraded from mysql when I moved from Debian Jessie to Stretch, so my folder structure might be different than a stock maria deployment (not sure if they use /etc/mysql for mariadb like the way it is on my system) so that might require some interpretation.

Anyway I am finally on 12.0.1 after much oomph! I hope this helps anyone else who may be struggling with this upgrade.