After upgrade to matomo4 along with other several issues when I try to convert to utf8mb4 using “console core:convert-to-utf8mb4” I got the following error:
SQLSTATE[HY000]: General error: 1034 Index for table ‘matomo_log_hsr_event’ is corrupt; try to repair it.
I have tried to repair the table doing the following:
repair table stament : fails because is an innodb table.
mysql dump and rebuild the table: the error keeps happening after that.
optimize table: It fails due the corrupted index.
Change storage engine to myisaam, repair and convert back to innodb: The repair says OK but when go back to innodb and run the convert command the index still corrupted.
mysql dump change to utf8mb4 manually in the ddl and execute: the indexes still corrupted.
As you can see I have tried everything I could find in the net, ¿Does anyone know how to fix this?
Are you using MariaDB 10.0/1 or MySQL 5.5? This could probably be that bug: https://jira.mariadb.org/browse/MDEV-18063 - we don’t necessarily expect a bug in the DB engine as a first option, but worth a try to update anyway.
I have finally found which index is producing the problems, its the idhsrblob, for some reason when I delete it, I can change the encoding of the table, but if I recreate it with create index and then try to change the encoding it fails with corruption again…
Good question - is there anything more verbose in the error-log? Apart from that, make sure that ROW_FORMAT is dynamic (I don’t think that this is the reason, but at the moment, I don’t really have a better idea).
The only message that appears is “[Warning] InnoDB: Retry attempts for writing partial data failed”
[EDIT]I have the feeling that the issue maybe related to the size of the tmp folder of mariadb, I gonna resize it for a higher value and see if can be this
Problem solved, the issue was because my tmpfs temp folder created for mariadb only had 256mb, after raise its size to 512 it was able to end the operation.