Re: Corrupt ARCHIVE tables failing to repair
Hi Dreas,
There seems to be a workaround which allows to fix the corrupted tables: run REPAIR TABLE <tablename> EXTENDED twice on the table. See the output below (`t` it's pretty much a copy of one of your tables).
Both 'EXTENDED' and 'twice' is important. The second attempt of REPAIR .. EXTENDED takes much longer, and after that the table starts being usable again. I've seen the same effect on other tables you uploaded. Please try it out.
MariaDB [test]> check table t;
-----------------------------+
| Table |
Op |
Msg_type |
Msg_text |
-----------------------------+
| test.t |
check |
error |
Corrupt |
-----------------------------+
1 row in set (11.52 sec)
MariaDB [test]> repair table t;
------------------------------+
| Table |
Op |
Msg_type |
Msg_text |
------------------------------+
| test.t |
repair |
error |
Corrupt |
------------------------------+
1 row in set (10.51 sec)
MariaDB [test]> check table t;
-----------------------------+
| Table |
Op |
Msg_type |
Msg_text |
-----------------------------+
| test.t |
check |
error |
Corrupt |
-----------------------------+
1 row in set (1.65 sec)
MariaDB [test]> insert into t select * from corrupt_archive_tables.t1;
ERROR 1034 (HY000): Incorrect key file for table 't'; try to repair it
MariaDB [test]> repair table t extended;
------------------------------+
| Table |
Op |
Msg_type |
Msg_text |
------------------------------+
------------------------------+
1 row in set (9.88 sec)
MariaDB [test]> check table t;
-----------------------------+
| Table |
Op |
Msg_type |
Msg_text |
-----------------------------+
| test.t |
check |
error |
Corrupt |
-----------------------------+
1 row in set (6.59 sec)
MariaDB [test]> repair table t extended;
------------------------------+
| Table |
Op |
Msg_type |
Msg_text |
------------------------------+
------------------------------+
1 row in set (40.35 sec)
MariaDB [test]> check table t;
-----------------------------+
| Table |
Op |
Msg_type |
Msg_text |
-----------------------------+
-----------------------------+
1 row in set (6.60 sec)
MariaDB [test]> insert into t select * from corrupt_archive_tables.t1;
Query OK, 700000 rows affected (23.28 sec)
Records: 700000 Duplicates: 0 Warnings: 0
Re: Corrupt ARCHIVE tables failing to repair
on irc:
<dreas> Basically if you kill MariaDB whilst it's writing to an archive table, you can throw it away afterwards