sub99
asked on
Fix "Got error 134 from storage engine"
Hi, I have a table "pc_table" not working well. One of the errors is "Got error 134 from storage engine". I would appreciate if someone could help.
mysql> select * from pc_table where pc_id=654565;
ERROR 1030 (HY000): Got error 134 from storage engine
also when i do a "insert into pc_table blabla" I will get the following error:
"DBD::mysql::st execute failed: Duplicate entry '654565' for key 1"
My php script was not able to connect to the database today and I had to restart mysqld. I think probably this "error 134" error is the reason?
And here is the output from "check table":
mmysql> check table pc_table EXTENDED;
+----------------------+-- -----+---- ------+--- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------+
| Table | Op | Msg_type | Msg_text |
+----------------------+-- -----+---- ------+--- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------+
| mydb.pc_table | check | warning | Table is marked as crashed |
| mydb.pc_table | check | warning | 2 clients are using or haven't closed the table properly |
| mydb.pc_table | check | error | Invalid key block position: 284932588628148224 key block size: 1024 file_length: 3870720 |
| mydb.pc_table | check | error | key delete-link-chain corrupted |
| mydb.pc_table | check | error | Corrupt |
+----------------------+-- -----+---- ------+--- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------+
Could somebody tell me:
1) what's the cause of the error? and how to prevent it in the future?
2) what's the best way to fix it? Use 'repair table' or load the corrupted pc_table from a backup? (I have a 1 day old backup).
Lose a few records is ok for me but I need to make sure this doesn't affect other tables in the database and the same problem doesn't happen again.
Thank you very much.
mysql> select * from pc_table where pc_id=654565;
ERROR 1030 (HY000): Got error 134 from storage engine
also when i do a "insert into pc_table blabla" I will get the following error:
"DBD::mysql::st execute failed: Duplicate entry '654565' for key 1"
My php script was not able to connect to the database today and I had to restart mysqld. I think probably this "error 134" error is the reason?
And here is the output from "check table":
mmysql> check table pc_table EXTENDED;
+----------------------+--
| Table | Op | Msg_type | Msg_text |
+----------------------+--
| mydb.pc_table | check | warning | Table is marked as crashed |
| mydb.pc_table | check | warning | 2 clients are using or haven't closed the table properly |
| mydb.pc_table | check | error | Invalid key block position: 284932588628148224 key block size: 1024 file_length: 3870720 |
| mydb.pc_table | check | error | key delete-link-chain corrupted |
| mydb.pc_table | check | error | Corrupt |
+----------------------+--
Could somebody tell me:
1) what's the cause of the error? and how to prevent it in the future?
2) what's the best way to fix it? Use 'repair table' or load the corrupted pc_table from a backup? (I have a 1 day old backup).
Lose a few records is ok for me but I need to make sure this doesn't affect other tables in the database and the same problem doesn't happen again.
Thank you very much.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.