F
F
fatedupi2017-01-10 13:54:21
MySQL
fatedupi, 2017-01-10 13:54:21

How to cure an innoDB table?

Hello, after the server crashed, the following situation happened:
One of the tables broke down - "d7_views_content_cache", I do not need data from this table, but it freezes in a strange state:
there is no access to it, it cannot be deleted, it cannot be created

MariaDB []> drop table d7_views_content_cache ;
ERROR 1051 (42S02): Unknown table 'd7_views_content_cache'


MariaDB []> CREATE TABLE `d7_views_content_cache` ( `timestamp` INT(64) NOT NULL DEFAULT '0' ) ENGINE = InnoDB;
ERROR 1005 (HY000): Can't create table 'd7_views_content_cache' (errno: -1)

MariaDB []> select * from d7_views_content_cache;
ERROR 1146 (42S02): Table 'd7_views_content_cache' doesn't exist

I tried to delete the d7_views_content_cache.ibd file, it is immediately recreated.
I really don’t want to restore from a backup (a lot of content, it will take a lot of time)
Tell me, can there be a way to somehow drop it or fix it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mikhail Miroshnichenko, 2017-01-10
@hetmansoftware

Probably it will turn out to bang a separate file of this table? The location of the files can be found here - https://hetmanrecovery.com/en/recovery_news/restor...

U
unwrecker, 2017-01-11
@unwrecker

file_per_table not enabled? It would be nice to include it for the future - deleting the table data file helps in such cases.

S
Swartalf, 2017-01-19
@Swartalf

Try to create this table in other basis, then you do discard.
physically transfer the files of the newly created table to the working database, do the import. As a variant it is possible to make drop/create the table.
See more details here (Discarding and Importing InnoDB Tablespaces) and here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question