MySQL Forums
Forum List  »  Archive Storage Engine

Select returns no rows
Posted by: Dan Kelly
Date: December 30, 2011 08:14AM

I have an archive engine table that I have copied from our production server back to our lab. I performed this copy by stopping the MySQL server and copying the file system directories. On the lab system, I updated the my.ini file to point to the correct data and InnoDB directories.

MySQL starts fine, however, when performing a SELECT on this table, no results are returned. The statistics, however, appear to be correct:

+------------+---------+---------------+------------+
| table_name | engine | total_size_kb | table_rows |
+------------+---------+---------------+------------+
| bulkdata | ARCHIVE | 5382180.75 | 260991277 |
+------------+---------+---------------+------------+
1 row in set (0.00 sec)

When I perform a check table, it shows the table as corrupt:
mysql> check table dotnetlogger.bulkdata;

+-----------------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------------+-------+----------+----------+
| dotnetlogger.bulkdata | check | error | Corrupt |
+-----------------------+-------+----------+----------+
1 row in set (0.00 sec)

I then repair the table, which apparently works:

mysql> repair table dotnetlogger.bulkdata;
+-----------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------------+--------+----------+----------+
| dotnetlogger.bulkdata | repair | status | OK |
+-----------------------+--------+----------+----------+
1 row in set (0.03 sec)

After repair, it appears to have lost all my data:

+------------+---------+---------------+------------+
| table_name | engine | total_size_kb | table_rows |
+------------+---------+---------------+------------+
| bulkdata | ARCHIVE | 0.09 | 0 |
+------------+---------+---------------+------------+
1 row in set (0.00 sec)

On our production system, the data is always readable. I am wondering what gets corrupted during the copy operation. Is there a better way to copy archive data in its compressed form? How can I recover this table?

Thank you.

Options: ReplyQuote


Subject
Views
Written By
Posted
Select returns no rows
8468
December 30, 2011 08:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.