Cannot upgrade from 4.16.0 to 5.0.0 ('The storage engine for the table doesn’t support descending indexes')

The error message implies that using DESC with indexes is not possible. Can anyone help? Thanks.

/var/www/html/matomo/core/Updates/5.0.0-b1.php: Error trying to execute the migration ‘ALTER TABLE piwik_log_visit ADD INDEX index_idsite_idvisitor_time (idsite, idvisitor, visit_last_action_time DESC);’. The error was: SQLSTATE[42000]: Syntax error or access violation: 1178 The storage engine for the table doesn’t support descending indexes

My version of mysql is 8.0.35, running on ubuntu 22.04

+1. Presumably due to some limitation of my web host’s sql implementation? Would help to know if there’s any simple workaround or if downgrading back to 4.x is necessary (or even possible).

Not sure it is a good solution, but at least I could use my matomo statistics again, - I connected to my db, and executed the ADD INDEX statement without DESC
Afterwords I could finish the automatic upgrade without any issues

I ended up reverting back to 4.16.0 (which was relatively straightforward) but I’ll try to upgrade to 5.0.0 again soon.

Thanks, that worked for me, executed ALTER TABLE 'piwik_log_visit' ADD INDEX 'index_idsite_idvisitor_time' ('idsite', 'idvisitor', 'visit_last_action_time') and then was able to complete the rest of the db update through the browser auto updater successfully.

Ich habe die Tabelle von MyIsam auf InnoDB umgestellt, dann lief es auch durch.

Hi @Dimitrius, @marcelb, @lippo, @py101
An issue has been created on December the 21st, 2023, and fixed on January, the 2nd, 2024. This fix will be available in Matomo 5.0.1.

1 Like