Solved

Fix "Got error 134 from storage engine"

Posted on 2008-08-21
1
2,058 Views
Last Modified: 2012-06-21
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.
0
Comment
Question by:sub99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
ServiceLogix earned 500 total points
ID: 22286598
Assuming you're using MyISAM tables here...

1) Sometimes it just happens.  It happens more frequently for us on tables that have a fulltext index and are updated or deleted.  However, it does happen occasionally on pretty simple tables as well.

2) Two ways to repair:  repair table <table> or myisamchk http://dev.mysql.com/doc/refman/5.0/en/myisamchk.html

Here's a link describing some of these sorts of problems and best practices:

http://dev.mysql.com/doc/refman/5.0/en/repair.html
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question