Solved

Fix "Got error 134 from storage engine"

Posted on 2008-08-21
1
2,059 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

Webinar: MariaDB® Server 10.2: The Complete Guide

Join Percona’s Chief Evangelist, Colin Charles as he presents MariaDB Server 10.2: The Complete Guide on Tuesday, June 27, 2017 at 7:00 am PDT / 10:00 am EDT (UTC-7).

Question has a verified solution.

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

I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
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 …

691 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